Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class TinyMCE_Layer

    Object
       |
       +--TinyMCE_Layer

class TinyMCE_Layer

Defined in TinyMCE_Layer.class.js

Constructor Summary
`TinyMCE_Layer (<string> id, <boolean> bm)` Constructor for the TinyMCE Layer.

Method Summary
`HTMLElement` | `create(<string> n, <string> c, <HTMLElement> p)` Creates a element for the layer based on the id and specified name.
`Object` | `getAbsPosition(<DOMElement> n)` Returns the absolute x, y cordinate of the specified node.
`HTMLElement` | `getBlocker()` Returns the blocker DOM element, this is a invisible iframe.
`HTMLElement` | `getElement()` Returns the DOM element that the layer is binded to.
`void` | `hide()` Hides the layer.
`boolean` | `isVisible()` Returns true/false if the layer is visible or not.
`void` | `moveBy(<int> x, <int> y)` Moves the layer relative in pixels.
`void` | `moveRelativeTo(<HTMLElement> re, <string> p)` Moves the layer relative to the specified HTML element.
`void` | `moveTo(<int> x, <int> y)` Moves the layer absolute in pixels.
`int` | `parseInt(<string> s)` Parses a int value this method will return 0 if the string is empty.
`void` | `resizeBy(<int> w, <int> h)` Resizes the layer by the specified relative width and height.
`void` | `resizeTo(<int> w, <int> h)` Resizes the layer to the specified width and height.
`void` | `setBlockMode(<boolean> s)` Sets the block mode.
`void` | `show()` Shows the layer.
`void` | `updateBlocker()` Updates the select/iframe/flash blocker this will also block the caret in Firefox.

Constructor Detail

### TinyMCE_Layer

    TinyMCE_Layer(<string> id, <boolean> bm)

Constructor for the TinyMCE Layer. This class enables you to construct floating layers that is visible on top of select input fields, flashes and iframes.

Parameters:

`id` - Unique ID name for the layer.

`bm` - Block mode, defaults to true.

Method Detail

### create

    HTMLElement create(<string> n, <string> c, <HTMLElement> p)

Creates a element for the layer based on the id and specified name.

Parameters:

`n` - Element tag name, like div.

`c` - Optional class name to set as class attribute value.

`p` - Optional parent element reference, defaults to body.

Returns:

HTML DOM element that got created.

### getAbsPosition

    Object getAbsPosition(<DOMElement> n)

Returns the absolute x, y cordinate of the specified node.

Parameters:

`n` - DOM node to retrive x, y of.

Returns:

Object containing absLeft and absTop properties.

### getBlocker

    HTMLElement getBlocker()

Returns the blocker DOM element, this is a invisible iframe.

Returns:

DOM HTML element.

### getElement

    HTMLElement getElement()

Returns the DOM element that the layer is binded to.

Returns:

DOM HTML element.

### hide

    void hide()

Hides the layer.

### isVisible

    boolean isVisible()

Returns true/false if the layer is visible or not.

Returns:

true/false if it's visible or not.

### moveBy

    void moveBy(<int> x, <int> y)

Moves the layer relative in pixels.

Parameters:

`x` - Horizontal relative position in pixels.

`y` - Vertical relative position in pixels.

### moveRelativeTo

    void moveRelativeTo(<HTMLElement> re, <string> p)

Moves the layer relative to the specified HTML element.

Parameters:

`re` - Element to move the layer relative to.

`p` - Position of the layer tl = top left, tr = top right, bl = bottom left, br = bottom right.

### moveTo

    void moveTo(<int> x, <int> y)

Moves the layer absolute in pixels.

Parameters:

`x` - Horizontal absolute position in pixels.

`y` - Vertical absolute position in pixels.

### parseInt

    int parseInt(<string> s)

Parses a int value this method will return 0 if the string is empty.

Parameters:

`s` - String to parse value of.

Returns:

Parsed number.

### resizeBy

    void resizeBy(<int> w, <int> h)

Resizes the layer by the specified relative width and height.

Parameters:

`w` - Relative width value.

`h` - Relative height value.

### resizeTo

    void resizeTo(<int> w, <int> h)

Resizes the layer to the specified width and height.

Parameters:

`w` - Width value.

`h` - Height value.

### setBlockMode

    void setBlockMode(<boolean> s)

Sets the block mode. If you set this property to true a control box blocker iframe will be added to the document since MSIE has a issue where select boxes are visible through layers.

Parameters:

`s` - Block mode state, true is the default value.

### show

    void show()

Shows the layer.

### updateBlocker

    void updateBlocker()

Updates the select/iframe/flash blocker this will also block the caret in Firefox.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Fri Apr 14 21:59:23 2006