dojo/dom-geometry¶
Project owner: | Eugene Lazutkin |
---|---|
since: | V1.7 |
Contents
This module defines the core dojo DOM geometry API. The convention for the return variable for this module is
domGeom
.
Support for deprecated legacy features are set in dojo/_base/html.
Features¶
Because dom-geometry
is a large module, the documentation of the features has been broken up into several pages.
Please see the following pages for each of the following features.
-
Gets the position and size of the passed element relative to the viewport (if
includeScroll==false
), or relative to the document root (ifincludeScroll==true
). dojo/dom-geometry::getMarginBox()
Returns an object that encodes the width, height, left and top positions of the node’s margin box.
dojo/dom-geometry::setMarginBox()
Sets the size of the node’s margin box and placement (left/top), irrespective of box model. Think of it as a passthrough to setBox that handles box-model vagaries for you.
dojo/dom-geometry::getContentBox()
Returns an object that encodes the width, height, left and top positions of the node’s content box, irrespective of the current box model.
dojo/dom-geometry::setContentSize()
Sets the size of the node’s contents, irrespective of margins, padding, or borders.
dojo/dom-geometry::getPadExtents()
Returns object with special values specifically useful for node fitting.
dojo/dom-geometry::getBorderExtents()
Returns an object with properties useful for noting the border dimensions.
dojo/dom-geometry::getPadBorderExtents()
Returns object with properties useful for box fitting with regards to padding.
dojo/dom-geometry::getMarginExtents()
Returns object with properties useful for box fitting with regards to box margins (i.e., the outer-box).
dojo/dom-geometry::isBodyLtr()
Returns true if the current language is left-to-right, and false otherwise.
dojo/dom-geometry::normalizeEvent()
Normalizes the geometry of a DOM event.
dojo/dom-geometry::docScroll()
Returns an object with {node, x, y} with corresponding offsets.
dojo/dom-geometry::fixIeBiDiScrollLeft()
In RTL direction, scrollLeft should be a negative value, but IE returns a positive one. All codes using documentElement.scrollLeft must call this function to fix this error, otherwise the position will offset to right when there is a horizontal scrollbar.
dojo/dom-geometry::getMarginSize()
Returns an object that encodes the width and height of the node’s margin box
See also¶
- dojo/dom - Core DOM API Library
- dojo/dom-construct - Dojo DOM Construction Library