class type statics =Inheritsobject
..end
method _ASCLASS : Js.number Js.t Js.prop
Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Add or remove the Ext.Layer.visibilityCls class to hide the element.
Defaults to: 4
method _DISPLAY : Js.number Js.t Js.prop
Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use the CSS 'display' property to hide the element.
Defaults to: 2
method _OFFSETS : Js.number Js.t Js.prop
Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use CSS absolute positioning and top/left offsets to hide the element.
Defaults to: 3
method _VISIBILITY : Js.number Js.t Js.prop
Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use the CSS 'visibility' property to hide the element.
Note that in this mode, isVisible may return true for an element even though it actually has a parent element that is hidden. For this reason, and in most cases, using the OFFSETS mode is a better choice.
Defaults to: 1
method fly : 'a 'b. 'a Js.t -> Js.js_string Js.t Js.optdef -> 'b Js.t Js.meth
Gets the singleton flyweight element, with the passed node as the active element.
Because it is a singleton, this Flyweight does not have an ID, and must be used and discarded in a single line. You may not keep and use the reference to this singleton over multiple lines because methods that you call may themselves make use of Ext.fly and may change the DOM element to which the instance refers.
Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext's classes. If accessing an element which will be processed regularly, then Ext.get will be more appropriate to take advantage of the caching provided by the Ext.dom.Element class.
Parameters:
_ Js.t
The dom node or id
Js.js_string Js.t
(optional)
Allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_global")
Returns:
Ext_dom_Element_Fly.t Js.t
The singleton flyweight object (or null if no matching element was found)
method fromPoint : Js.number Js.t -> Js.number Js.t -> Js.js_string Js.t Js.meth
Returns the top Element that is located at the passed coordinates
Defined in override Ext.dom.AbstractElement_static.
Parameters:
Js.number Js.t
The x coordinate
Js.number Js.t
The y coordinate
Returns:
Js.js_string Js.t
The found Element
method get : 'c 'd. 'c Js.t -> 'd Js.t Js.meth
Retrieves Ext.dom.Element objects. Ext.get is alias for Ext.dom.Element.get.
This method does not retrieve Components. This method retrieves Ext.dom.Element objects which encapsulate DOM elements. To retrieve a Component by its ID, use Ext.ComponentManager.get.
When passing an id, it should not include the #
character that is used for a css selector.
// For an element with id 'foo'
Ext.get('foo'); // Correct
Ext.get('#foo'); // Incorrect
Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.
Parameters:
_ Js.t
The id of the node, a DOM Node or an existing Element.
Returns:
Ext_dom_Element.t Js.t
The Element object (or null if no matching element was found)
method getDocumentHeight : Js.number Js.t Js.meth
Retrieves the document height
Defined in override Ext.dom.AbstractElement_static.
Returns:
Js.number Js.t
documentHeight
method getDocumentWidth : Js.number Js.t Js.meth
Retrieves the document width
Defined in override Ext.dom.AbstractElement_static.
Returns:
Js.number Js.t
documentWidth
method getOrientation : Js.js_string Js.t Js.meth
Retrieves the current orientation of the window. This is calculated by determing if the height is greater than the width.
Defined in override Ext.dom.AbstractElement_static.
Returns:
Js.js_string Js.t
Orientation of window: 'portrait' or 'landscape'
method getViewSize : 'e. 'e Js.t Js.meth
Retrieves the viewport size of the window.
Defined in override Ext.dom.AbstractElement_static.
Returns:
_ Js.t
object containing width and height properties
method getViewportHeight : Js.number Js.t Js.meth
Retrieves the viewport height of the window.
Defined in override Ext.dom.AbstractElement_static.
Returns:
Js.number Js.t
viewportHeight
method getViewportWidth : Js.number Js.t Js.meth
Retrieves the viewport width of the window.
Defined in override Ext.dom.AbstractElement_static.
Returns:
Js.number Js.t
viewportWidth
method mergeClsList : 'f 'g 'h. 'f Js.t -> 'g Js.t -> 'h Js.js_array Js.t Js.meth
Returns an array of unique class names based upon the input strings, or string arrays.
The number of parameters is unlimited.
Example
// Add x-invalid and x-mandatory classes, do not duplicate
myElement.dom.className = Ext.core.Element.mergeClsList(this.initialClasses, 'x-invalid x-mandatory');
Parameters:
_ Js.t
A string of class names, or an array of class names.
_ Js.t
A string of class names, or an array of class names.
Returns:
_ Js.js_array Js.t
An array of strings representing remaining unique, merged class names. If class names were added to the first list, the changed
property will be true
.
method normalize : Js.js_string Js.t -> Js.js_string Js.t Js.meth
Normalizes CSS property keys from dash delimited to camel case JavaScript Syntax. For example:
Defined in override Ext.dom.AbstractElement_static.
Parameters:
Js.js_string Js.t
The property to normalize
Returns:
Js.js_string Js.t
The normalized string
method parseBox : 'i 'j. 'i Js.t -> 'j Js.t Js.meth
Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)
Defined in override Ext.dom.AbstractElement_static.
Parameters:
_ Js.t
The encoded margins
Returns:
_ Js.t
An object with margin sizes for top, right, bottom and left
method parseStyles : 'k. Js.js_string Js.t -> 'k Js.t Js.meth
Converts a CSS string into an object with a property for each style.
The sample code below would return an object with 2 properties, one for background-color and one for color.
var css = 'background-color: red;color: blue; ';
console.log(Ext.dom.Element.parseStyles(css));
Defined in override Ext.dom.AbstractElement_static.
Parameters:
Js.js_string Js.t
A CSS string
Returns:
_ Js.t
styles
method removeCls : 'l 'm 'n. 'l Js.t -> 'm Js.t -> 'n Js.js_array Js.t Js.meth
Returns an array of unique class names deom the first parameter with all class names from the second parameter removed.
Example
// Remove x-invalid and x-mandatory classes if present.
myElement.dom.className = Ext.core.Element.removeCls(this.initialClasses, 'x-invalid x-mandatory');
Parameters:
_ Js.t
A string of class names, or an array of class names.
_ Js.t
A string of class names, or an array of class names to remove from existingClsList
.
Returns:
_ Js.js_array Js.t
An array of strings representing remaining class names. If class names were removed, the changed
property will be true
.
method unitizeBox : 'o. 'o Js.t -> Js.js_string Js.t -> Js.js_string Js.t Js.meth
Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)
Defined in override Ext.dom.AbstractElement_static.
Parameters:
_ Js.t
The encoded margins, or an object with top, right, bottom, and left properties
Js.js_string Js.t
The type of units to add
Returns:
Js.js_string Js.t
An string with unitized (px if units is not specified) metrics for top, right, bottom and left