gridx
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

gridx.modules.HLayout

Object » _Module » gridx.modules.HLayout
dojo.require("gridx.modules.HLayout");
Defined in gridx/modules/HLayout.js

When a user creates a grid with a given width, it means the width of the whole grid, which includes grid body, row header, and virtical scrollerbar (and maybe more in the future). So the width of the grid body must be calculated out so as to layout the grid properly. This module calculates grid body width by collecting width from all the registered grid UI parts. It is assumed that the width of these UI parts will not change when grid is resized.

Method Summary

  • _layout()
  • getAPIPath()
  • load(args, startup)
  • reLayout() Re-layout the grid horizontally. This means calculated the width of all registered grid UI components except the grid body. Then update the grid body width. Usually there's no need for users to call this method. It'll be automatically called when calling grid.resize().
  • register(ready, refNode, isTail) Register a 'refNode' so this module can calculate its width when it is 'ready'

Event Summary

Methods

_layout
Overrides _Module
getAPIPath
Overrides _Module
load
Overrides _Module
ParameterTypeDescription
args
startup
reLayout
Overrides _Module
Re-layout the grid horizontally. This means calculated the width of all registered grid UI components except the grid body. Then update the grid body width. Usually there's no need for users to call this method. It'll be automatically called when calling grid.resize().
register
Overrides _Module
Register a 'refNode' so this module can calculate its width when it is 'ready'
ParameterTypeDescription
readydojo.Deferred|nullA deferred object indicating when the DOM node is ready for width calculation. If omitted, it means the refNode can be calculated at any time.
refNodeDOMNodeThe DOM node that represents a UI part in grid.
isTailBoolean
Optional.
If the 'refNode' appears after(LTR: right, RTL: left) the grid body, set this to true.

Events

onUpdateWidth
Overrides _Module
Fired when the body width is updated.