1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- define("dijit/_Contained", [
- "dojo/_base/declare",
- "./registry"
- ], function(declare, registry){
-
-
-
-
- return declare("dijit._Contained", null, {
-
-
-
-
-
-
- _getSibling: function(/*String*/ which){
-
-
-
-
-
-
- var node = this.domNode;
- do{
- node = node[which+"Sibling"];
- }while(node && node.nodeType != 1);
- return node && registry.byNode(node);
- },
- getPreviousSibling: function(){
-
-
-
- return this._getSibling("previous");
- },
- getNextSibling: function(){
-
-
-
- return this._getSibling("next");
- },
- getIndexInParent: function(){
-
-
-
-
- var p = this.getParent();
- if(!p || !p.getIndexOfChild){
- return -1;
- }
- return p.getIndexOfChild(this);
- }
- });
- });
|