dijit/layout/_ContentPaneResizeMixin (version 1.10)

Summary

Resize() functionality of ContentPane. If there's a single layout widget child then it will call resize() with the same dimensions as the ContentPane. Otherwise just calls resize on each child.

Also implements basic startup() functionality, where starting the parent will start the children

See the dijit/layout/_ContentPaneResizeMixin reference documentation for more information.

Property Summary

  • doLayoutfalse - don't adjust size of children true - if there is a single visible child widget, set it's size to however big the ContentPane is
  • isLayoutContainerIndicates that this widget will call resize() on it's child widgets when they become visible.

Method Summary

  • _checkIfSingleChild() Test if we have exactly one visible widget as a child, and if so assume that we are a container for that widget, and should propagate startup() and resize() calls to it.
  • _isShown() Returns true if the content is currently shown.
  • _layout(changeSize,resultSize) Resize myself according to optional changeSize/resultSize parameters, like a layout widget.
  • _layoutChildren()
  • _scheduleLayout(changeSize,resultSize) Resize myself, and call resize() on each of my child layout widgets, either now (if I'm currently visible) or when I become visible
  • resize(changeSize,resultSize) See dijit/layout/_LayoutWidget.resize() for description.
  • startup() See dijit/layout/_LayoutWidget.startup() for description.

Event Summary

  • _onShow() Called when the ContentPane is made visible

Properties

doLayout
  • false - don't adjust size of children
  • true - if there is a single visible child widget, set it's size to however big the ContentPane is
isLayoutContainer

Indicates that this widget will call resize() on it's child widgets when they become visible.

Methods

_checkIfSingleChild()

Test if we have exactly one visible widget as a child, and if so assume that we are a container for that widget, and should propagate startup() and resize() calls to it. Skips over things like data stores since they aren't visible.

_isShown()

Returns true if the content is currently shown.

If I am a child of a layout widget then it actually returns true if I've ever been visible, not whether I'm currently visible, since that's much faster than tracing up the DOM/widget tree every call, and at least solves the performance problem on page load by deferring loading hidden ContentPanes until they are first shown

Returns:undefined
_layout(changeSize,resultSize)

Resize myself according to optional changeSize/resultSize parameters, like a layout widget. Also, since I am an isLayoutContainer widget, each of my children expects me to call resize() or layout() on it.

Should be called on initialization and also whenever we get new content (from an href, or from set('content', ...))... but deferred until the ContentPane is visible

Parameter Type Description
changeSize undefined
resultSize undefined
_layoutChildren()
_scheduleLayout(changeSize,resultSize)

Resize myself, and call resize() on each of my child layout widgets, either now (if I'm currently visible) or when I become visible

Parameter Type Description
changeSize undefined
resultSize undefined
resize(changeSize,resultSize)

See dijit/layout/_LayoutWidget.resize() for description. Although ContentPane doesn't extend _LayoutWidget, it does implement the same API.

Parameter Type Description
changeSize undefined
resultSize undefined
startup()

See dijit/layout/_LayoutWidget.startup() for description. Although ContentPane doesn't extend _LayoutWidget, it does implement the same API.

Events

_onShow()

Called when the ContentPane is made visible

For a plain ContentPane, this is called on initialization, from startup(). If the ContentPane is a hidden pane of a TabContainer etc., then it's called whenever the pane is made visible.

Does layout/resize of child widget(s)

Error in the documentation? Can’t find what you are looking for? Let us know!