Index | OAT homepage | OpenLink Software

# OATDOCresize

- OATDOCresize
- _ _ resize.js
- _ _ _ _ Functions
- _ _ _ _ _ _ OAT.Resize.create(clicker, mover, type[, restrictionFunction[, endFunction]])
- _ _ _ _ _ _ OAT.Resize.remove(clicker, element)
- _ _ _ _ _ _ OAT.Resize.removeAll(clicker)
- _ _ _ _ Constants
- _ _ _ _ _ _ OAT.Resize.TYPE_
- _ _ _ _ Example

## resize.js

Provides resizing capability for any DOM node.

### Functions

#### OAT.Resize.create(clicker, mover, type[, restrictionFunction[, endFunction]])

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)

#### OAT.Resize.remove(clicker, element)

Removes resizing relation between `clicker` and `element` .

#### OAT.Resize.removeAll(clicker)

Removes all resizing relations from `clicker` .

### Constants

#### OAT.Resize.TYPE_

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

### Example

    var corner = OAT.Dom.create("div");
    var body = OAT.Dom.create("div");
    body.appendChild(corner);
    OAT.Resize.create(corner, body, OAT.Resize.TYPE_XY);

Copyright (C) 2005-2008 OpenLink Software