Module Ext_dom_Element


module Ext_dom_Element: sig .. end
Encapsulates a DOM element, adding simple DOM mani ...

Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.

All instances of this class inherit the methods of Ext.fx.Anim making visual effects easily available to all DOM elements.

Note that the events documented in this class are not Ext events, they encapsulate browser events. Some older browsers may not support the full range of events. Which events are supported is beyond the control of Ext JS.

Usage:

// by id
var el = Ext.get("my-div");

// by DOM element reference
var el = Ext.get(myDivElement);

Animations

When an element is manipulated, by default there is no animation.

var el = Ext.get("my-div");

// no animation
el.setWidth(100);

Many of the functions for manipulating an element have an optional "animate" parameter. This parameter can be specified as boolean (true) for default animation effects.

// default animation
el.setWidth(100, true);

To configure the effects, an object literal with animation options to use as the Element animation configuration object can also be specified. Note that the supported Element animation configuration options are a subset of the Ext.fx.Anim animation options specific to Fx effects. The supported Element animation configuration options are:

Option    Default   Description
--------- --------  ---------------------------------------------
duration  350       The duration of the animation in milliseconds
easing    easeOut   The easing method
callback  none      A function to execute when the anim completes
scope     this      The scope (this) of the callback function

Usage:

// Element animation options object
var opt = {
    duration: 1000,
    easing: 'elasticIn',
    callback: this.foo,
    scope: this
};
// animation with some options set
el.setWidth(100, opt);

The Element animation object being used for the animation will be set on the options object as "anim", which allows you to stop or manipulate the animation. Here is an example:

// using the "anim" property to get the Anim object
if(opt.anim.isAnimated()){
    opt.anim.stop();
}

Composite (Collections of) Elements

For working with collections of Elements, see Ext.CompositeElement

From override Ext.rtl.dom.Element_position: This override adds RTL positioning methods to Ext.dom.Element.



class type t = object .. end
class type configs = object .. end
class type events = object .. end
class type statics = object .. end
val get_static : unit -> statics Js.t
Static instance for lazy-loaded modules.
val static : statics Js.t
Static instance.
val select : 'a Js.t -> bool Js.t Js.optdef -> 'b Js.t Js.optdef -> 'c Js.t
See method statics.select
val of_configs : configs Js.t -> t Js.t
of_configs c casts a config object c to an instance of class t
val to_configs : t Js.t -> configs Js.t
to_configs o casts instance o of class t to a config object