dijit/layout/SplitContainer.js

  • Provides:

    • dijit.layout.SplitContainer
  • dijit.layout.SplitContainer

    • type
      Function
    • chains:
      • dijit.layout._LayoutWidget: (prototype)
      • dijit.layout._LayoutWidget: (call)
    • summary
      Deprecated.  Use `dijit.layout.BorderContainer` instead.
    • description
      A Container widget with sizing handles in-between each child.
      Contains multiple children widgets, all of which are displayed side by side
      (either horizontally or vertically); there's a bar between each of the children,
      and you can adjust the relative size of each child by dragging the bars.
      
      You must specify a size (width and height) for the SplitContainer.
      tags:
      deprecated
    • source: [view]
        dojo.deprecated("dijit.layout.SplitContainer is deprecated", "use BorderContainer with splitter instead", 2.0);
  • dijit.layout.SplitContainer.activeSizing

    • type
      Boolean
    • summary
      If true, the children's size changes as you drag the bar;
      otherwise, the sizes don't change until you drop the bar (by mouse-up)
  • dijit.layout.SplitContainer.sizerWidth

    • type
      Integer
    • summary
      Size in pixels of the bar between each child
  • dijit.layout.SplitContainer.orientation

    • type
      String
    • summary
      either 'horizontal' or vertical; indicates whether the children are
      arranged side-by-side or up/down.
  • dijit.layout.SplitContainer.persist

    • type
      Boolean
    • summary
      Save splitter positions in a cookie
  • dijit.layout.SplitContainer.baseClass

    • summary
  • dijit.layout.SplitContainer.postMixInProperties

    • type
      Function
    • source: [view]
        this.inherited("postMixInProperties",arguments);
        this.isHorizontal = (this.orientation == 'horizontal');
    • summary
  • dijit.layout.SplitContainer.postCreate

    • type
      Function
    • source: [view]
        this.inherited(arguments);
        this.sizers = [];


        // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
        // to keep other combined css classes from inadvertantly making the overflow visible
        if(dojo.isMozilla){
         this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
        }


        // create the fake dragger
        if(typeof this.sizerWidth == "object"){
         try{ //FIXME: do this without a try/catch
          this.sizerWidth = parseInt(this.sizerWidth.toString());
         }catch(e){ this.sizerWidth = 7; }
        }
        var sizer = dojo.doc.createElement('div');
        this.virtualSizer = sizer;
        sizer.style.position = 'relative';


        // #1681: work around the dreaded 'quirky percentages in IE' layout bug
        // If the splitcontainer's dimensions are specified in percentages, it
        // will be resized when the virtualsizer is displayed in _showSizingLine
        // (typically expanding its bounds unnecessarily). This happens because
        // we use position: relative for .dijitSplitContainer.
        // The workaround: instead of changing the display style attribute,
        // switch to changing the zIndex (bring to front/move to back)


        sizer.style.zIndex = 10;
        sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
        this.domNode.appendChild(sizer);
        dojo.setSelectable(sizer, false);
    • summary
  • dijit.layout.SplitContainer.destroy

    • type
      Function
    • source: [view]
        delete this.virtualSizer;
        dojo.forEach(this._ownconnects, dojo.disconnect);
        this.inherited(arguments);
    • summary
  • dijit.layout.SplitContainer.startup

    • type
      Function
    • source: [view]
        if(this._started){ return; }


        dojo.forEach(this.getChildren(), function(child, i, children){
         // attach the children and create the draggers
         this._setupChild(child);


         if(i < children.length-1){
          this._addSizer();
         }
        }, this);


        if(this.persist){
         this._restoreState();
        }


        this.inherited(arguments);
    • summary
  • dijit.layout.SplitContainer._setupChild

    • type
      Function
    • parameters:
      • child: (typeof dijit._Widget)
    • source: [view]
        this.inherited(arguments);
        child.domNode.style.position = "absolute";
        dojo.addClass(child.domNode, "dijitSplitPane");
    • summary
  • dijit.layout.SplitContainer._onSizerMouseDown

    • type
      Function
    • parameters:
      • e: (typeof )
    • source: [view]
        if(e.target.id){
         for(var i=0;i    if(this.sizers[i].id == e.target.id){
           break;
          }
         }
         if(i    this.beginSizing(e,i);
         }
        }
    • summary
  • dijit.layout.SplitContainer._addSizer

    • type
      Function
    • parameters:
      • index: (typeof )
    • source: [view]
        index = index === undefined ? this.sizers.length : index;


        // TODO: use a template for this!!!
        var sizer = dojo.doc.createElement('div');
        sizer.id=dijit.getUniqueId('dijit_layout_SplitterContainer_Splitter');
        this.sizers.splice(index,0,sizer);
        this.domNode.appendChild(sizer);


        sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';


        // add the thumb div
        var thumb = dojo.doc.createElement('div');
        thumb.className = 'thumb';
        sizer.appendChild(thumb);


        // FIXME: are you serious? why aren't we using mover start/stop combo?
        this.connect(sizer, "onmousedown", '_onSizerMouseDown');


        dojo.setSelectable(sizer, false);
    • summary
  • dijit.layout.SplitContainer.removeChild

    • type
      Function
    • parameters:
      • widget: (typeof )
    • source: [view]
        if(this.sizers.length){
         var i=dojo.indexOf(this.getChildren(), widget)
         if(i != -1){
          if(i == this.sizers.length){
           i--;
          }
          dojo.destroy(this.sizers[i]);
          this.sizers.splice(i,1);
         }
        }


        // Remove widget and repaint
        this.inherited(arguments);
        if(this._started){
         this.layout();
        }
    • summary
      Remove sizer, but only if widget is really our child and
      we have at least one sizer to throw away
  • dijit.layout.SplitContainer.addChild

    • type
      Function
    • parameters:
      • child: (typeof dijit._Widget)
        a widget to add
      • insertIndex: (typeof Integer)
        postion in the &quot;stack&quot; to add the child widget
    • source: [view]
        this.inherited(arguments);


        if(this._started){
         // Do the stuff that startup() does for each widget
         var children = this.getChildren();
         if(children.length > 1){
          this._addSizer(insertIndex);
         }


         // and then reposition (ie, shrink) every pane to make room for the new guy
         this.layout();
        }
    • summary
      Add a child widget to the container
  • dijit.layout.SplitContainer.layout

    • type
      Function
    • source: [view]
      define("dijit/layout/SplitContainer", ["dojo", "dijit", "dojo/cookie", "dijit/layout/_LayoutWidget"], function(dojo, dijit) {


      //
      // FIXME: make it prettier
      // FIXME: active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case)
      //




      dojo.declare("dijit.layout.SplitContainer",
       dijit.layout._LayoutWidget,
       {
       // summary:
       //  Deprecated. Use `dijit.layout.BorderContainer` instead.
       // description:
       //  A Container widget with sizing handles in-between each child.
       //  Contains multiple children widgets, all of which are displayed side by side
       //  (either horizontally or vertically); there's a bar between each of the children,
       //  and you can adjust the relative size of each child by dragging the bars.
       //
       //  You must specify a size (width and height) for the SplitContainer.
       // tags:
       //  deprecated


       constructor: function(){
        dojo.deprecated("dijit.layout.SplitContainer is deprecated", "use BorderContainer with splitter instead", 2.0);
       },


       // activeSizing: Boolean
       //  If true, the children's size changes as you drag the bar;
       //  otherwise, the sizes don't change until you drop the bar (by mouse-up)
       activeSizing: false,


       // sizerWidth: Integer
       //  Size in pixels of the bar between each child
       sizerWidth: 7, // FIXME: this should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)


       // orientation: String
       //  either 'horizontal' or vertical; indicates whether the children are
       //  arranged side-by-side or up/down.
       orientation: 'horizontal',


       // persist: Boolean
       //  Save splitter positions in a cookie
       persist: true,


       baseClass: "dijitSplitContainer",


       postMixInProperties: function(){
        this.inherited("postMixInProperties",arguments);
        this.isHorizontal = (this.orientation == 'horizontal');
       },


       postCreate: function(){
        this.inherited(arguments);
        this.sizers = [];


        // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
        // to keep other combined css classes from inadvertantly making the overflow visible
        if(dojo.isMozilla){
         this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
        }


        // create the fake dragger
        if(typeof this.sizerWidth == "object"){
         try{ //FIXME: do this without a try/catch
          this.sizerWidth = parseInt(this.sizerWidth.toString());
         }catch(e){ this.sizerWidth = 7; }
        }
        var sizer = dojo.doc.createElement('div');
        this.virtualSizer = sizer;
        sizer.style.position = 'relative';


        // #1681: work around the dreaded 'quirky percentages in IE' layout bug
        // If the splitcontainer's dimensions are specified in percentages, it
        // will be resized when the virtualsizer is displayed in _showSizingLine
        // (typically expanding its bounds unnecessarily). This happens because
        // we use position: relative for .dijitSplitContainer.
        // The workaround: instead of changing the display style attribute,
        // switch to changing the zIndex (bring to front/move to back)


        sizer.style.zIndex = 10;
        sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
        this.domNode.appendChild(sizer);
        dojo.setSelectable(sizer, false);
       },


       destroy: function(){
        delete this.virtualSizer;
        dojo.forEach(this._ownconnects, dojo.disconnect);
        this.inherited(arguments);
       },
       startup: function(){
        if(this._started){ return; }


        dojo.forEach(this.getChildren(), function(child, i, children){
         // attach the children and create the draggers
         this._setupChild(child);


         if(i < children.length-1){
          this._addSizer();
         }
        }, this);


        if(this.persist){
         this._restoreState();
        }


        this.inherited(arguments);
       },


       _setupChild: function(/*dijit._Widget*/ child){
        this.inherited(arguments);
        child.domNode.style.position = "absolute";
        dojo.addClass(child.domNode, "dijitSplitPane");
       },


       _onSizerMouseDown: function(e){
        if(e.target.id){
         for(var i=0;i    if(this.sizers[i].id == e.target.id){
           break;
          }
         }
         if(i    this.beginSizing(e,i);
         }
        }
       },
       _addSizer: function(index){
        index = index === undefined ? this.sizers.length : index;


        // TODO: use a template for this!!!
        var sizer = dojo.doc.createElement('div');
        sizer.id=dijit.getUniqueId('dijit_layout_SplitterContainer_Splitter');
        this.sizers.splice(index,0,sizer);
        this.domNode.appendChild(sizer);


        sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';


        // add the thumb div
        var thumb = dojo.doc.createElement('div');
        thumb.className = 'thumb';
        sizer.appendChild(thumb);


        // FIXME: are you serious? why aren't we using mover start/stop combo?
        this.connect(sizer, "onmousedown", '_onSizerMouseDown');


        dojo.setSelectable(sizer, false);
       },


       removeChild: function(widget){
        // summary:
        //  Remove sizer, but only if widget is really our child and
        // we have at least one sizer to throw away
        if(this.sizers.length){
         var i=dojo.indexOf(this.getChildren(), widget)
         if(i != -1){
          if(i == this.sizers.length){
           i--;
          }
          dojo.destroy(this.sizers[i]);
          this.sizers.splice(i,1);
         }
        }


        // Remove widget and repaint
        this.inherited(arguments);
        if(this._started){
         this.layout();
        }
       },


       addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
        // summary:
        //  Add a child widget to the container
        // child:
        //  a widget to add
        // insertIndex:
        //  postion in the "stack" to add the child widget


        this.inherited(arguments);


        if(this._started){
         // Do the stuff that startup() does for each widget
         var children = this.getChildren();
         if(children.length > 1){
          this._addSizer(insertIndex);
         }


         // and then reposition (ie, shrink) every pane to make room for the new guy
         this.layout();
        }
       },


       layout: function(){
        // summary:
        //  Do layout of panels


        // base class defines this._contentBox on initial creation and also
        // on resize
        this.paneWidth = this._contentBox.w;
        this.paneHeight = this._contentBox.h;


        var children = this.getChildren();
        if(!children.length){ return; }


        //
        // calculate space
        //


        var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
        if(children.length > 1){
         space -= this.sizerWidth * (children.length - 1);
        }


        //
        // calculate total of SizeShare values
        //
        var outOf = 0;
        dojo.forEach(children, function(child){
         outOf += child.sizeShare;
        });


        //
        // work out actual pixels per sizeshare unit
        //
        var pixPerUnit = space / outOf;


        //
        // set the SizeActual member of each pane
        //
        var totalSize = 0;
        dojo.forEach(children.slice(0, children.length - 1), function(child){
         var size = Math.round(pixPerUnit * child.sizeShare);
         child.sizeActual = size;
         totalSize += size;
        });


        children[children.length-1].sizeActual = space - totalSize;


        //
        // make sure the sizes are ok
        //
        this._checkSizes();


        //
        // now loop, positioning each pane and letting children resize themselves
        //


        var pos = 0;
        var size = children[0].sizeActual;
        this._movePanel(children[0], pos, size);
        children[0].position = pos;
        pos += size;


        // if we don't have any sizers, our layout method hasn't been called yet
        // so bail until we are called..TODO: REVISIT: need to change the startup
        // algorithm to guaranteed the ordering of calls to layout method
        if(!this.sizers){
         return;
        }


        dojo.some(children.slice(1), function(child, i){
         // error-checking
         if(!this.sizers[i]){
          return true;
         }
         // first we position the sizing handle before this pane
         this._moveSlider(this.sizers[i], pos, this.sizerWidth);
         this.sizers[i].position = pos;
         pos += this.sizerWidth;


         size = child.sizeActual;
         this._movePanel(child, pos, size);
         child.position = pos;
         pos += size;
        }, this);
    • summary
  • dijit.layout.SplitContainer._movePanel

    • type
      Function
    • parameters:
      • panel: (typeof )
      • pos: (typeof )
      • size: (typeof )
    • source: [view]
        if(this.isHorizontal){
         panel.domNode.style.left = pos + 'px'; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = 0;
         var box = {w: size, h: this.paneHeight};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }else{
         panel.domNode.style.left = 0; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = pos + 'px';
         var box = {w: this.paneWidth, h: size};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }
    • summary
  • dijit.layout.SplitContainer._moveSlider

    • type
      Function
    • parameters:
      • slider: (typeof )
      • pos: (typeof )
      • size: (typeof )
    • source: [view]
        if(this.isHorizontal){
         slider.style.left = pos + 'px';
         slider.style.top = 0;
         dojo.marginBox(slider, { w: size, h: this.paneHeight });
        }else{
         slider.style.left = 0;
         slider.style.top = pos + 'px';
         dojo.marginBox(slider, { w: this.paneWidth, h: size });
        }
    • summary
  • dijit.layout.SplitContainer._growPane

    • type
      Function
    • parameters:
      • growth: (typeof )
      • pane: (typeof )
    • source: [view]
        if(growth > 0){
         if(pane.sizeActual > pane.sizeMin){
          if((pane.sizeActual - pane.sizeMin) > growth){


           // stick all the growth in this pane
           pane.sizeActual = pane.sizeActual - growth;
           growth = 0;
          }else{
           // put as much growth in here as we can
           growth -= pane.sizeActual - pane.sizeMin;
           pane.sizeActual = pane.sizeMin;
          }
         }
        }
        return growth;
    • summary
  • dijit.layout.SplitContainer._checkSizes

    • type
      Function
    • source: [view]
        var totalMinSize = 0;
        var totalSize = 0;
        var children = this.getChildren();


        dojo.forEach(children, function(child){
         totalSize += child.sizeActual;
         totalMinSize += child.sizeMin;
        });


        // only make adjustments if we have enough space for all the minimums


        if(totalMinSize <= totalSize){


         var growth = 0;


         dojo.forEach(children, function(child){
          if(child.sizeActual < child.sizeMin){
           growth += child.sizeMin - child.sizeActual;
           child.sizeActual = child.sizeMin;
          }
         });


         if(growth > 0){
          var list = this.isDraggingLeft ? children.reverse() : children;
          dojo.forEach(list, function(child){
           growth = this._growPane(growth, child);
          }, this);
         }
        }else{
         dojo.forEach(children, function(child){
          child.sizeActual = Math.round(totalSize * (child.sizeMin / totalMinSize));
         });
        }
    • summary
  • dijit.layout.SplitContainer.beginSizing

    • type
      Function
    • parameters:
      • e: (typeof )
      • i: (typeof )
    • source: [view]
        var children = this.getChildren();
        this.paneBefore = children[i];
        this.paneAfter = children[i+1];


        this.isSizing = true;
        this.sizingSplitter = this.sizers[i];


        if(!this.cover){
         this.cover = dojo.create('div', {
           style: {
            position:'absolute',
            zIndex:5,
            top: 0,
            left: 0,
            width: "100%",
            height: "100%"
           }
          }, this.domNode);
        }else{
         this.cover.style.zIndex = 5;
        }
        this.sizingSplitter.style.zIndex = 6;


        // TODO: REVISIT - we want MARGIN_BOX and core hasn't exposed that yet (but can't we use it anyway if we pay attention? we do elsewhere.)
        this.originPos = dojo.position(children[0].domNode, true);
        if(this.isHorizontal){
         var client = e.layerX || e.offsetX || 0;
         var screen = e.pageX;
         this.originPos = this.originPos.x;
        }else{
         var client = e.layerY || e.offsetY || 0;
         var screen = e.pageY;
         this.originPos = this.originPos.y;
        }
        this.startPoint = this.lastPoint = screen;
        this.screenToClientOffset = screen - client;
        this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;


        if(!this.activeSizing){
         this._showSizingLine();
        }


        //
        // attach mouse events
        //
        this._ownconnects = [];
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmousemove", this, "changeSizing"));
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmouseup", this, "endSizing"));


        dojo.stopEvent(e);
    • summary
  • dijit.layout.SplitContainer.changeSizing

    • type
      Function
    • parameters:
      • e: (typeof )
    • source: [view]
        if(!this.isSizing){ return; }
        this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
        this.movePoint();
        if(this.activeSizing){
         this._updateSize();
        }else{
         this._moveSizingLine();
        }
        dojo.stopEvent(e);
    • summary
  • dijit.layout.SplitContainer.endSizing

    • type
      Function
    • parameters:
      • e: (typeof )
    • source: [view]
        if(!this.isSizing){ return; }
        if(this.cover){
         this.cover.style.zIndex = -1;
        }
        if(!this.activeSizing){
         this._hideSizingLine();
        }


        this._updateSize();


        this.isSizing = false;


        if(this.persist){
         this._saveState(this);
        }


        dojo.forEach(this._ownconnects, dojo.disconnect);
    • summary
  • dijit.layout.SplitContainer.movePoint

    • type
      Function
    • source: [view]
      define("dijit/layout/SplitContainer", ["dojo", "dijit", "dojo/cookie", "dijit/layout/_LayoutWidget"], function(dojo, dijit) {


      //
      // FIXME: make it prettier
      // FIXME: active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case)
      //




      dojo.declare("dijit.layout.SplitContainer",
       dijit.layout._LayoutWidget,
       {
       // summary:
       //  Deprecated. Use `dijit.layout.BorderContainer` instead.
       // description:
       //  A Container widget with sizing handles in-between each child.
       //  Contains multiple children widgets, all of which are displayed side by side
       //  (either horizontally or vertically); there's a bar between each of the children,
       //  and you can adjust the relative size of each child by dragging the bars.
       //
       //  You must specify a size (width and height) for the SplitContainer.
       // tags:
       //  deprecated


       constructor: function(){
        dojo.deprecated("dijit.layout.SplitContainer is deprecated", "use BorderContainer with splitter instead", 2.0);
       },


       // activeSizing: Boolean
       //  If true, the children's size changes as you drag the bar;
       //  otherwise, the sizes don't change until you drop the bar (by mouse-up)
       activeSizing: false,


       // sizerWidth: Integer
       //  Size in pixels of the bar between each child
       sizerWidth: 7, // FIXME: this should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)


       // orientation: String
       //  either 'horizontal' or vertical; indicates whether the children are
       //  arranged side-by-side or up/down.
       orientation: 'horizontal',


       // persist: Boolean
       //  Save splitter positions in a cookie
       persist: true,


       baseClass: "dijitSplitContainer",


       postMixInProperties: function(){
        this.inherited("postMixInProperties",arguments);
        this.isHorizontal = (this.orientation == 'horizontal');
       },


       postCreate: function(){
        this.inherited(arguments);
        this.sizers = [];


        // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
        // to keep other combined css classes from inadvertantly making the overflow visible
        if(dojo.isMozilla){
         this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
        }


        // create the fake dragger
        if(typeof this.sizerWidth == "object"){
         try{ //FIXME: do this without a try/catch
          this.sizerWidth = parseInt(this.sizerWidth.toString());
         }catch(e){ this.sizerWidth = 7; }
        }
        var sizer = dojo.doc.createElement('div');
        this.virtualSizer = sizer;
        sizer.style.position = 'relative';


        // #1681: work around the dreaded 'quirky percentages in IE' layout bug
        // If the splitcontainer's dimensions are specified in percentages, it
        // will be resized when the virtualsizer is displayed in _showSizingLine
        // (typically expanding its bounds unnecessarily). This happens because
        // we use position: relative for .dijitSplitContainer.
        // The workaround: instead of changing the display style attribute,
        // switch to changing the zIndex (bring to front/move to back)


        sizer.style.zIndex = 10;
        sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
        this.domNode.appendChild(sizer);
        dojo.setSelectable(sizer, false);
       },


       destroy: function(){
        delete this.virtualSizer;
        dojo.forEach(this._ownconnects, dojo.disconnect);
        this.inherited(arguments);
       },
       startup: function(){
        if(this._started){ return; }


        dojo.forEach(this.getChildren(), function(child, i, children){
         // attach the children and create the draggers
         this._setupChild(child);


         if(i < children.length-1){
          this._addSizer();
         }
        }, this);


        if(this.persist){
         this._restoreState();
        }


        this.inherited(arguments);
       },


       _setupChild: function(/*dijit._Widget*/ child){
        this.inherited(arguments);
        child.domNode.style.position = "absolute";
        dojo.addClass(child.domNode, "dijitSplitPane");
       },


       _onSizerMouseDown: function(e){
        if(e.target.id){
         for(var i=0;i    if(this.sizers[i].id == e.target.id){
           break;
          }
         }
         if(i    this.beginSizing(e,i);
         }
        }
       },
       _addSizer: function(index){
        index = index === undefined ? this.sizers.length : index;


        // TODO: use a template for this!!!
        var sizer = dojo.doc.createElement('div');
        sizer.id=dijit.getUniqueId('dijit_layout_SplitterContainer_Splitter');
        this.sizers.splice(index,0,sizer);
        this.domNode.appendChild(sizer);


        sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';


        // add the thumb div
        var thumb = dojo.doc.createElement('div');
        thumb.className = 'thumb';
        sizer.appendChild(thumb);


        // FIXME: are you serious? why aren't we using mover start/stop combo?
        this.connect(sizer, "onmousedown", '_onSizerMouseDown');


        dojo.setSelectable(sizer, false);
       },


       removeChild: function(widget){
        // summary:
        //  Remove sizer, but only if widget is really our child and
        // we have at least one sizer to throw away
        if(this.sizers.length){
         var i=dojo.indexOf(this.getChildren(), widget)
         if(i != -1){
          if(i == this.sizers.length){
           i--;
          }
          dojo.destroy(this.sizers[i]);
          this.sizers.splice(i,1);
         }
        }


        // Remove widget and repaint
        this.inherited(arguments);
        if(this._started){
         this.layout();
        }
       },


       addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
        // summary:
        //  Add a child widget to the container
        // child:
        //  a widget to add
        // insertIndex:
        //  postion in the "stack" to add the child widget


        this.inherited(arguments);


        if(this._started){
         // Do the stuff that startup() does for each widget
         var children = this.getChildren();
         if(children.length > 1){
          this._addSizer(insertIndex);
         }


         // and then reposition (ie, shrink) every pane to make room for the new guy
         this.layout();
        }
       },


       layout: function(){
        // summary:
        //  Do layout of panels


        // base class defines this._contentBox on initial creation and also
        // on resize
        this.paneWidth = this._contentBox.w;
        this.paneHeight = this._contentBox.h;


        var children = this.getChildren();
        if(!children.length){ return; }


        //
        // calculate space
        //


        var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
        if(children.length > 1){
         space -= this.sizerWidth * (children.length - 1);
        }


        //
        // calculate total of SizeShare values
        //
        var outOf = 0;
        dojo.forEach(children, function(child){
         outOf += child.sizeShare;
        });


        //
        // work out actual pixels per sizeshare unit
        //
        var pixPerUnit = space / outOf;


        //
        // set the SizeActual member of each pane
        //
        var totalSize = 0;
        dojo.forEach(children.slice(0, children.length - 1), function(child){
         var size = Math.round(pixPerUnit * child.sizeShare);
         child.sizeActual = size;
         totalSize += size;
        });


        children[children.length-1].sizeActual = space - totalSize;


        //
        // make sure the sizes are ok
        //
        this._checkSizes();


        //
        // now loop, positioning each pane and letting children resize themselves
        //


        var pos = 0;
        var size = children[0].sizeActual;
        this._movePanel(children[0], pos, size);
        children[0].position = pos;
        pos += size;


        // if we don't have any sizers, our layout method hasn't been called yet
        // so bail until we are called..TODO: REVISIT: need to change the startup
        // algorithm to guaranteed the ordering of calls to layout method
        if(!this.sizers){
         return;
        }


        dojo.some(children.slice(1), function(child, i){
         // error-checking
         if(!this.sizers[i]){
          return true;
         }
         // first we position the sizing handle before this pane
         this._moveSlider(this.sizers[i], pos, this.sizerWidth);
         this.sizers[i].position = pos;
         pos += this.sizerWidth;


         size = child.sizeActual;
         this._movePanel(child, pos, size);
         child.position = pos;
         pos += size;
        }, this);
       },


       _movePanel: function(panel, pos, size){
        if(this.isHorizontal){
         panel.domNode.style.left = pos + 'px'; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = 0;
         var box = {w: size, h: this.paneHeight};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }else{
         panel.domNode.style.left = 0; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = pos + 'px';
         var box = {w: this.paneWidth, h: size};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }
       },


       _moveSlider: function(slider, pos, size){
        if(this.isHorizontal){
         slider.style.left = pos + 'px';
         slider.style.top = 0;
         dojo.marginBox(slider, { w: size, h: this.paneHeight });
        }else{
         slider.style.left = 0;
         slider.style.top = pos + 'px';
         dojo.marginBox(slider, { w: this.paneWidth, h: size });
        }
       },


       _growPane: function(growth, pane){
        if(growth > 0){
         if(pane.sizeActual > pane.sizeMin){
          if((pane.sizeActual - pane.sizeMin) > growth){


           // stick all the growth in this pane
           pane.sizeActual = pane.sizeActual - growth;
           growth = 0;
          }else{
           // put as much growth in here as we can
           growth -= pane.sizeActual - pane.sizeMin;
           pane.sizeActual = pane.sizeMin;
          }
         }
        }
        return growth;
       },


       _checkSizes: function(){


        var totalMinSize = 0;
        var totalSize = 0;
        var children = this.getChildren();


        dojo.forEach(children, function(child){
         totalSize += child.sizeActual;
         totalMinSize += child.sizeMin;
        });


        // only make adjustments if we have enough space for all the minimums


        if(totalMinSize <= totalSize){


         var growth = 0;


         dojo.forEach(children, function(child){
          if(child.sizeActual < child.sizeMin){
           growth += child.sizeMin - child.sizeActual;
           child.sizeActual = child.sizeMin;
          }
         });


         if(growth > 0){
          var list = this.isDraggingLeft ? children.reverse() : children;
          dojo.forEach(list, function(child){
           growth = this._growPane(growth, child);
          }, this);
         }
        }else{
         dojo.forEach(children, function(child){
          child.sizeActual = Math.round(totalSize * (child.sizeMin / totalMinSize));
         });
        }
       },


       beginSizing: function(e, i){
        var children = this.getChildren();
        this.paneBefore = children[i];
        this.paneAfter = children[i+1];


        this.isSizing = true;
        this.sizingSplitter = this.sizers[i];


        if(!this.cover){
         this.cover = dojo.create('div', {
           style: {
            position:'absolute',
            zIndex:5,
            top: 0,
            left: 0,
            width: "100%",
            height: "100%"
           }
          }, this.domNode);
        }else{
         this.cover.style.zIndex = 5;
        }
        this.sizingSplitter.style.zIndex = 6;


        // TODO: REVISIT - we want MARGIN_BOX and core hasn't exposed that yet (but can't we use it anyway if we pay attention? we do elsewhere.)
        this.originPos = dojo.position(children[0].domNode, true);
        if(this.isHorizontal){
         var client = e.layerX || e.offsetX || 0;
         var screen = e.pageX;
         this.originPos = this.originPos.x;
        }else{
         var client = e.layerY || e.offsetY || 0;
         var screen = e.pageY;
         this.originPos = this.originPos.y;
        }
        this.startPoint = this.lastPoint = screen;
        this.screenToClientOffset = screen - client;
        this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;


        if(!this.activeSizing){
         this._showSizingLine();
        }


        //
        // attach mouse events
        //
        this._ownconnects = [];
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmousemove", this, "changeSizing"));
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmouseup", this, "endSizing"));


        dojo.stopEvent(e);
       },


       changeSizing: function(e){
        if(!this.isSizing){ return; }
        this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
        this.movePoint();
        if(this.activeSizing){
         this._updateSize();
        }else{
         this._moveSizingLine();
        }
        dojo.stopEvent(e);
       },


       endSizing: function(e){
        if(!this.isSizing){ return; }
        if(this.cover){
         this.cover.style.zIndex = -1;
        }
        if(!this.activeSizing){
         this._hideSizingLine();
        }


        this._updateSize();


        this.isSizing = false;


        if(this.persist){
         this._saveState(this);
        }


        dojo.forEach(this._ownconnects, dojo.disconnect);
       },


       movePoint: function(){


        // make sure lastPoint is a legal point to drag to
        var p = this.lastPoint - this.screenToClientOffset;


        var a = p - this.dragOffset;
        a = this.legaliseSplitPoint(a);
        p = a + this.dragOffset;


        this.lastPoint = p + this.screenToClientOffset;
    • summary
  • dijit.layout.SplitContainer.legaliseSplitPoint

    • type
      Function
    • parameters:
      • a: (typeof )
    • source: [view]
        a += this.sizingSplitter.position;


        this.isDraggingLeft = !!(a > 0);


        if(!this.activeSizing){
         var min = this.paneBefore.position + this.paneBefore.sizeMin;
         if(a < min){
          a = min;
         }


         var max = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin));
         if(a > max){
          a = max;
         }
        }


        a -= this.sizingSplitter.position;


        this._checkSizes();


        return a;
    • summary
  • dijit.layout.SplitContainer._updateSize

    • type
      Function
    • source: [view]
      define("dijit/layout/SplitContainer", ["dojo", "dijit", "dojo/cookie", "dijit/layout/_LayoutWidget"], function(dojo, dijit) {


      //
      // FIXME: make it prettier
      // FIXME: active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case)
      //




      dojo.declare("dijit.layout.SplitContainer",
       dijit.layout._LayoutWidget,
       {
       // summary:
       //  Deprecated. Use `dijit.layout.BorderContainer` instead.
       // description:
       //  A Container widget with sizing handles in-between each child.
       //  Contains multiple children widgets, all of which are displayed side by side
       //  (either horizontally or vertically); there's a bar between each of the children,
       //  and you can adjust the relative size of each child by dragging the bars.
       //
       //  You must specify a size (width and height) for the SplitContainer.
       // tags:
       //  deprecated


       constructor: function(){
        dojo.deprecated("dijit.layout.SplitContainer is deprecated", "use BorderContainer with splitter instead", 2.0);
       },


       // activeSizing: Boolean
       //  If true, the children's size changes as you drag the bar;
       //  otherwise, the sizes don't change until you drop the bar (by mouse-up)
       activeSizing: false,


       // sizerWidth: Integer
       //  Size in pixels of the bar between each child
       sizerWidth: 7, // FIXME: this should be a CSS attribute (at 7 because css wants it to be 7 until we fix to css)


       // orientation: String
       //  either 'horizontal' or vertical; indicates whether the children are
       //  arranged side-by-side or up/down.
       orientation: 'horizontal',


       // persist: Boolean
       //  Save splitter positions in a cookie
       persist: true,


       baseClass: "dijitSplitContainer",


       postMixInProperties: function(){
        this.inherited("postMixInProperties",arguments);
        this.isHorizontal = (this.orientation == 'horizontal');
       },


       postCreate: function(){
        this.inherited(arguments);
        this.sizers = [];


        // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435)
        // to keep other combined css classes from inadvertantly making the overflow visible
        if(dojo.isMozilla){
         this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work
        }


        // create the fake dragger
        if(typeof this.sizerWidth == "object"){
         try{ //FIXME: do this without a try/catch
          this.sizerWidth = parseInt(this.sizerWidth.toString());
         }catch(e){ this.sizerWidth = 7; }
        }
        var sizer = dojo.doc.createElement('div');
        this.virtualSizer = sizer;
        sizer.style.position = 'relative';


        // #1681: work around the dreaded 'quirky percentages in IE' layout bug
        // If the splitcontainer's dimensions are specified in percentages, it
        // will be resized when the virtualsizer is displayed in _showSizingLine
        // (typically expanding its bounds unnecessarily). This happens because
        // we use position: relative for .dijitSplitContainer.
        // The workaround: instead of changing the display style attribute,
        // switch to changing the zIndex (bring to front/move to back)


        sizer.style.zIndex = 10;
        sizer.className = this.isHorizontal ? 'dijitSplitContainerVirtualSizerH' : 'dijitSplitContainerVirtualSizerV';
        this.domNode.appendChild(sizer);
        dojo.setSelectable(sizer, false);
       },


       destroy: function(){
        delete this.virtualSizer;
        dojo.forEach(this._ownconnects, dojo.disconnect);
        this.inherited(arguments);
       },
       startup: function(){
        if(this._started){ return; }


        dojo.forEach(this.getChildren(), function(child, i, children){
         // attach the children and create the draggers
         this._setupChild(child);


         if(i < children.length-1){
          this._addSizer();
         }
        }, this);


        if(this.persist){
         this._restoreState();
        }


        this.inherited(arguments);
       },


       _setupChild: function(/*dijit._Widget*/ child){
        this.inherited(arguments);
        child.domNode.style.position = "absolute";
        dojo.addClass(child.domNode, "dijitSplitPane");
       },


       _onSizerMouseDown: function(e){
        if(e.target.id){
         for(var i=0;i    if(this.sizers[i].id == e.target.id){
           break;
          }
         }
         if(i    this.beginSizing(e,i);
         }
        }
       },
       _addSizer: function(index){
        index = index === undefined ? this.sizers.length : index;


        // TODO: use a template for this!!!
        var sizer = dojo.doc.createElement('div');
        sizer.id=dijit.getUniqueId('dijit_layout_SplitterContainer_Splitter');
        this.sizers.splice(index,0,sizer);
        this.domNode.appendChild(sizer);


        sizer.className = this.isHorizontal ? 'dijitSplitContainerSizerH' : 'dijitSplitContainerSizerV';


        // add the thumb div
        var thumb = dojo.doc.createElement('div');
        thumb.className = 'thumb';
        sizer.appendChild(thumb);


        // FIXME: are you serious? why aren't we using mover start/stop combo?
        this.connect(sizer, "onmousedown", '_onSizerMouseDown');


        dojo.setSelectable(sizer, false);
       },


       removeChild: function(widget){
        // summary:
        //  Remove sizer, but only if widget is really our child and
        // we have at least one sizer to throw away
        if(this.sizers.length){
         var i=dojo.indexOf(this.getChildren(), widget)
         if(i != -1){
          if(i == this.sizers.length){
           i--;
          }
          dojo.destroy(this.sizers[i]);
          this.sizers.splice(i,1);
         }
        }


        // Remove widget and repaint
        this.inherited(arguments);
        if(this._started){
         this.layout();
        }
       },


       addChild: function(/*dijit._Widget*/ child, /*Integer?*/ insertIndex){
        // summary:
        //  Add a child widget to the container
        // child:
        //  a widget to add
        // insertIndex:
        //  postion in the "stack" to add the child widget


        this.inherited(arguments);


        if(this._started){
         // Do the stuff that startup() does for each widget
         var children = this.getChildren();
         if(children.length > 1){
          this._addSizer(insertIndex);
         }


         // and then reposition (ie, shrink) every pane to make room for the new guy
         this.layout();
        }
       },


       layout: function(){
        // summary:
        //  Do layout of panels


        // base class defines this._contentBox on initial creation and also
        // on resize
        this.paneWidth = this._contentBox.w;
        this.paneHeight = this._contentBox.h;


        var children = this.getChildren();
        if(!children.length){ return; }


        //
        // calculate space
        //


        var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
        if(children.length > 1){
         space -= this.sizerWidth * (children.length - 1);
        }


        //
        // calculate total of SizeShare values
        //
        var outOf = 0;
        dojo.forEach(children, function(child){
         outOf += child.sizeShare;
        });


        //
        // work out actual pixels per sizeshare unit
        //
        var pixPerUnit = space / outOf;


        //
        // set the SizeActual member of each pane
        //
        var totalSize = 0;
        dojo.forEach(children.slice(0, children.length - 1), function(child){
         var size = Math.round(pixPerUnit * child.sizeShare);
         child.sizeActual = size;
         totalSize += size;
        });


        children[children.length-1].sizeActual = space - totalSize;


        //
        // make sure the sizes are ok
        //
        this._checkSizes();


        //
        // now loop, positioning each pane and letting children resize themselves
        //


        var pos = 0;
        var size = children[0].sizeActual;
        this._movePanel(children[0], pos, size);
        children[0].position = pos;
        pos += size;


        // if we don't have any sizers, our layout method hasn't been called yet
        // so bail until we are called..TODO: REVISIT: need to change the startup
        // algorithm to guaranteed the ordering of calls to layout method
        if(!this.sizers){
         return;
        }


        dojo.some(children.slice(1), function(child, i){
         // error-checking
         if(!this.sizers[i]){
          return true;
         }
         // first we position the sizing handle before this pane
         this._moveSlider(this.sizers[i], pos, this.sizerWidth);
         this.sizers[i].position = pos;
         pos += this.sizerWidth;


         size = child.sizeActual;
         this._movePanel(child, pos, size);
         child.position = pos;
         pos += size;
        }, this);
       },


       _movePanel: function(panel, pos, size){
        if(this.isHorizontal){
         panel.domNode.style.left = pos + 'px'; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = 0;
         var box = {w: size, h: this.paneHeight};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }else{
         panel.domNode.style.left = 0; // TODO: resize() takes l and t parameters too, don't need to set manually
         panel.domNode.style.top = pos + 'px';
         var box = {w: this.paneWidth, h: size};
         if(panel.resize){
          panel.resize(box);
         }else{
          dojo.marginBox(panel.domNode, box);
         }
        }
       },


       _moveSlider: function(slider, pos, size){
        if(this.isHorizontal){
         slider.style.left = pos + 'px';
         slider.style.top = 0;
         dojo.marginBox(slider, { w: size, h: this.paneHeight });
        }else{
         slider.style.left = 0;
         slider.style.top = pos + 'px';
         dojo.marginBox(slider, { w: this.paneWidth, h: size });
        }
       },


       _growPane: function(growth, pane){
        if(growth > 0){
         if(pane.sizeActual > pane.sizeMin){
          if((pane.sizeActual - pane.sizeMin) > growth){


           // stick all the growth in this pane
           pane.sizeActual = pane.sizeActual - growth;
           growth = 0;
          }else{
           // put as much growth in here as we can
           growth -= pane.sizeActual - pane.sizeMin;
           pane.sizeActual = pane.sizeMin;
          }
         }
        }
        return growth;
       },


       _checkSizes: function(){


        var totalMinSize = 0;
        var totalSize = 0;
        var children = this.getChildren();


        dojo.forEach(children, function(child){
         totalSize += child.sizeActual;
         totalMinSize += child.sizeMin;
        });


        // only make adjustments if we have enough space for all the minimums


        if(totalMinSize <= totalSize){


         var growth = 0;


         dojo.forEach(children, function(child){
          if(child.sizeActual < child.sizeMin){
           growth += child.sizeMin - child.sizeActual;
           child.sizeActual = child.sizeMin;
          }
         });


         if(growth > 0){
          var list = this.isDraggingLeft ? children.reverse() : children;
          dojo.forEach(list, function(child){
           growth = this._growPane(growth, child);
          }, this);
         }
        }else{
         dojo.forEach(children, function(child){
          child.sizeActual = Math.round(totalSize * (child.sizeMin / totalMinSize));
         });
        }
       },


       beginSizing: function(e, i){
        var children = this.getChildren();
        this.paneBefore = children[i];
        this.paneAfter = children[i+1];


        this.isSizing = true;
        this.sizingSplitter = this.sizers[i];


        if(!this.cover){
         this.cover = dojo.create('div', {
           style: {
            position:'absolute',
            zIndex:5,
            top: 0,
            left: 0,
            width: "100%",
            height: "100%"
           }
          }, this.domNode);
        }else{
         this.cover.style.zIndex = 5;
        }
        this.sizingSplitter.style.zIndex = 6;


        // TODO: REVISIT - we want MARGIN_BOX and core hasn't exposed that yet (but can't we use it anyway if we pay attention? we do elsewhere.)
        this.originPos = dojo.position(children[0].domNode, true);
        if(this.isHorizontal){
         var client = e.layerX || e.offsetX || 0;
         var screen = e.pageX;
         this.originPos = this.originPos.x;
        }else{
         var client = e.layerY || e.offsetY || 0;
         var screen = e.pageY;
         this.originPos = this.originPos.y;
        }
        this.startPoint = this.lastPoint = screen;
        this.screenToClientOffset = screen - client;
        this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;


        if(!this.activeSizing){
         this._showSizingLine();
        }


        //
        // attach mouse events
        //
        this._ownconnects = [];
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmousemove", this, "changeSizing"));
        this._ownconnects.push(dojo.connect(dojo.doc.documentElement, "onmouseup", this, "endSizing"));


        dojo.stopEvent(e);
       },


       changeSizing: function(e){
        if(!this.isSizing){ return; }
        this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
        this.movePoint();
        if(this.activeSizing){
         this._updateSize();
        }else{
         this._moveSizingLine();
        }
        dojo.stopEvent(e);
       },


       endSizing: function(e){
        if(!this.isSizing){ return; }
        if(this.cover){
         this.cover.style.zIndex = -1;
        }
        if(!this.activeSizing){
         this._hideSizingLine();
        }


        this._updateSize();


        this.isSizing = false;


        if(this.persist){
         this._saveState(this);
        }


        dojo.forEach(this._ownconnects, dojo.disconnect);
       },


       movePoint: function(){


        // make sure lastPoint is a legal point to drag to
        var p = this.lastPoint - this.screenToClientOffset;


        var a = p - this.dragOffset;
        a = this.legaliseSplitPoint(a);
        p = a + this.dragOffset;


        this.lastPoint = p + this.screenToClientOffset;
       },


       legaliseSplitPoint: function(a){


        a += this.sizingSplitter.position;


        this.isDraggingLeft = !!(a > 0);


        if(!this.activeSizing){
         var min = this.paneBefore.position + this.paneBefore.sizeMin;
         if(a < min){
          a = min;
         }


         var max = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin));
         if(a > max){
          a = max;
         }
        }


        a -= this.sizingSplitter.position;


        this._checkSizes();


        return a;
       },


       _updateSize: function(){
       //FIXME: sometimes this.lastPoint is NaN
        var pos = this.lastPoint - this.dragOffset - this.originPos;


        var start_region = this.paneBefore.position;
        var end_region = this.paneAfter.position + this.paneAfter.sizeActual;


        this.paneBefore.sizeActual = pos - start_region;
        this.paneAfter.position = pos + this.sizerWidth;
        this.paneAfter.sizeActual = end_region - this.paneAfter.position;


        dojo.forEach(this.getChildren(), function(child){
         child.sizeShare = child.sizeActual;
        });


        if(this._started){
         this.layout();
        }
    • summary
  • dijit.layout.SplitContainer._showSizingLine

    • type
      Function
    • source: [view]
        this._moveSizingLine();


        dojo.marginBox(this.virtualSizer,
         this.isHorizontal ? { w: this.sizerWidth, h: this.paneHeight } : { w: this.paneWidth, h: this.sizerWidth });


        this.virtualSizer.style.display = 'block';
    • summary
  • dijit.layout.SplitContainer._hideSizingLine

    • type
      Function
    • source: [view]
        this.virtualSizer.style.display = 'none';
    • summary
  • dijit.layout.SplitContainer._moveSizingLine

    • type
      Function
    • source: [view]
        var pos = (this.lastPoint - this.startPoint) + this.sizingSplitter.position;
        dojo.style(this.virtualSizer,(this.isHorizontal ? "left" : "top"),pos+"px");
        // this.virtualSizer.style[ this.isHorizontal ? "left" : "top" ] = pos + 'px'; // FIXME: remove this line if the previous is better
    • summary
  • dijit.layout.SplitContainer._getCookieName

    • type
      Function
    • parameters:
      • i: (typeof )
    • source: [view]
        return this.id + "_" + i;
    • summary
  • dijit.layout.SplitContainer._restoreState

    • type
      Function
    • source: [view]
        dojo.forEach(this.getChildren(), function(child, i){
         var cookieName = this._getCookieName(i);
         var cookieValue = dojo.cookie(cookieName);
         if(cookieValue){
          var pos = parseInt(cookieValue);
          if(typeof pos == "number"){
           child.sizeShare = pos;
          }
         }
        }, this);
    • summary
  • dijit.layout.SplitContainer._saveState

    • type
      Function
    • source: [view]
        if(!this.persist){
         return;
        }
        dojo.forEach(this.getChildren(), function(child, i){
         dojo.cookie(this._getCookieName(i), child.sizeShare, {expires:365});
        }, this);
    • summary
  • dijit.layout.SplitContainer.isHorizontal

    • summary
  • dijit.layout.SplitContainer.sizers

    • summary
  • dijit.layout.SplitContainer.domNode.style.overflow

    • summary
  • dijit.layout.SplitContainer.virtualSizer

    • summary
  • dijit.layout.SplitContainer.paneWidth

    • summary
  • dijit.layout.SplitContainer.paneHeight

    • summary
  • dijit.layout.SplitContainer.paneBefore

    • summary
  • dijit.layout.SplitContainer.paneAfter

    • summary
  • dijit.layout.SplitContainer.isSizing

    • summary
  • dijit.layout.SplitContainer.sizingSplitter

    • summary
  • dijit.layout.SplitContainer.cover

    • summary
  • dijit.layout.SplitContainer.cover.style.zIndex

    • summary
  • dijit.layout.SplitContainer.sizingSplitter.style.zIndex

    • summary
  • dijit.layout.SplitContainer.originPos

    • summary
  • dijit.layout.SplitContainer.startPoint

    • summary
  • dijit.layout.SplitContainer.screenToClientOffset

    • summary
  • dijit.layout.SplitContainer.dragOffset

    • summary
  • dijit.layout.SplitContainer._ownconnects

    • summary
  • dijit.layout.SplitContainer.lastPoint

    • summary
  • dijit.layout.SplitContainer.isDraggingLeft

    • summary
  • dijit.layout.SplitContainer.paneBefore.sizeActual

    • summary
  • dijit.layout.SplitContainer.paneAfter.position

    • summary
  • dijit.layout.SplitContainer.paneAfter.sizeActual

    • summary
  • dijit.layout.SplitContainer.virtualSizer.style.display

    • summary
  • dijit._Widget.sizeMin

    • summary
  • dijit._Widget.sizeShare

    • summary
  • dijit.layout

    • type
      Object
    • summary
  • dijit

    • type
      Object
    • summary