0 results found

tinymce.dom.Element

Contribute to this page
Namespacetinymce.dom
ClassElement

Element class, this enables element blocking in IE. Element blocking is a method to block out select blockes that gets visible though DIVs on IE 6 it uses a iframe for this blocking. This class also shortens the length of some DOM API calls since it's bound to an element.

Example

Public Methods

MethodDefined By
Element(id:String, settings:Object) : Constructs a new Element instance.Element
getSize():Object : Returns the size of the element by a object with w and h fields.Element
getXY():Object : Returns the absolute X, Y cordinate of the element.Element
moveBy(x:Number, y:Number):void : Moves the element relative to the current position.Element
moveTo(x:Number, y:Number):void : Moves the element to a specific absolute position.Element
on(n:String, f:function, s:Object):function : Adds a event handler to the element.Element
resizeBy(w:Number, h:Numner):void : Resizes the element relative to the current sizeto a specific size.Element
resizeTo(w:Number, h:Numner):void : Resizes the element to a specific size.Element
update(k:String):void : Updates the element blocker in IE6 based on the style information of the element.Element

Method details

Element

public function Element(id:String, settings:Object)
Constructs a new Element instance. Consult the Wiki for more details on this class.

Parameters

ParamDetail
id:StringElement ID to bind/execute methods on.
settings:ObjectOptional settings name/value collection.

getSize

public function getSize():Object
Returns the size of the element by a object with w and h fields.

Returns
Object - Object with element size with a w and h field.

getXY

public function getXY():Object
Returns the absolute X, Y cordinate of the element.

Returns
Object - Objext with x, y cordinate fields.

moveBy

public function moveBy(x:Number, y:Number):void
Moves the element relative to the current position.

Parameters

ParamDetail
x:NumberRelative X cordinate of element position.
y:NumberRelative Y cordinate of element position.

moveTo

public function moveTo(x:Number, y:Number):void
Moves the element to a specific absolute position.

Parameters

ParamDetail
x:NumberX cordinate of element position.
y:NumberY cordinate of element position.

on

public function on(n:String, f:function, s:Object):function
Adds a event handler to the element.

Parameters

ParamDetail
n:StringEvent name like for example "click".
f:functionFunction to execute on the specified event.
s:ObjectOptional scope to execute function on.

Returns
function - Event handler function the same as the input function.

resizeBy

public function resizeBy(w:Number, h:Numner):void
Resizes the element relative to the current sizeto a specific size.

Parameters

ParamDetail
w:NumberRelative width of element.
h:NumnerRelative height of element.

resizeTo

public function resizeTo(w:Number, h:Numner):void
Resizes the element to a specific size.

Parameters

ParamDetail
w:NumberNew width of element.
h:NumnerNew height of element.

update

public function update(k:String):void
Updates the element blocker in IE6 based on the style information of the element.

Parameters

ParamDetail
k:StringOptional function key. Used internally.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.