dijit/layout/utils (version 1.10)

Summary

Utility functions for doing layout

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

Method Summary

  • layoutChildren(container,dim,children,changedRegionId,changedRegionSize) Layout a bunch of child dom nodes within a parent dom node
  • marginBox2contentBox(node,mb) Given the margin-box size of a node, return its content box size.

Methods

layoutChildren(container,dim,children,changedRegionId,changedRegionSize)
Defined by dijit/layout/utils

Layout a bunch of child dom nodes within a parent dom node

Parameter Type Description
container DomNode

parent node

dim Object

{l, t, w, h} object specifying dimensions of container into which to place children

children Widget[]

An array of Widgets or at least objects containing:

  • domNode: pointer to DOM node to position
  • region or layoutAlign: position to place DOM node
  • resize(): (optional) method to set size of node
  • id: (optional) Id of widgets, referenced from resize object, below.

The widgets in this array should be ordered according to how they should be laid out (each element will be processed in order, and take up as much remaining space as needed), with the center widget last.

changedRegionId String
Optional

If specified, the slider for the region with the specified id has been dragged, and thus the region's height or width should be adjusted according to changedRegionSize

changedRegionSize Number
Optional

See changedRegionId.

marginBox2contentBox(node,mb)
Defined by dijit/layout/utils

Given the margin-box size of a node, return its content box size. Functions like domGeometry.contentBox() but is more reliable since it doesn't have to wait for the browser to compute sizes.

Parameter Type Description
node DomNode
mb Object
Returns:object
Error in the documentation? Can’t find what you are looking for? Let us know!