Provides resizing capability for any DOM node.
Modifies element such that clicking and moving on clicker will cause it to resize.
- clicker - ID or DOM element
- mover - ID or DOM element
- type - one of the OAT.Resize.TYPE_ constants; specifies resizing direction(s).
- restrictionFunction - function with bool result which tells if resizing is permitted (optional)
- endFunction - function performed at the end of resize task (optional)
Removes resizing relation between clicker and element.
Removes all resizing relations from clicker.
Tells which direction resizing is permitted.
- OAT.Resize.TYPE_X - X-axis only
- OAT.Resize.TYPE_Y - Y-axis only
- OAT.Resize.TYPE_XY - both axes
var corner = OAT.Dom.create("div"); var body = OAT.Dom.create("div"); body.appendChild(corner); OAT.Resize.create(corner, body, OAT.Resize.TYPE_XY);