| Element( String/HTMLElement element , [Boolean forceNew ] )
+For working with collections of Elements, see Ext.CompositeElement Public Properties|
| DISPLAY : Number | Element | | OFFSETS : NumberVisibility mode constant for use with setVisibilityMode. Use offsets (x and y positioning offscreen)
+to hide element. | Element | | VISIBILITY : NumberVisibility mode constant for use with setVisibilityMode. Use visibility to hide element | Element | | autoBoxAdjust : Object true to automatically adjust width and height settings for box-model issues (default to true) | Element | | defaultUnit : String The default unit to append to CSS values where a unit isn't provided (defaults to px). | Element | | dom : HTMLElement The DOM element | Element | | id : String The DOM element ID | Element | | originalDisplay : String The element's default display mode (defaults to "") | Element | | visibilityCls : String Defaults to 'x-hide-nosize' | Element |
Public Methods|
| Element( String/HTMLElement element , [Boolean forceNew ] )
Create a new Element directly. Create a new Element directly. | Element | | addClass( String/Array className )
:
Ext.ElementAdds one or more CSS classes to the element. Duplicate classes are automatically filtered out. Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out. | Element | | addClassOnClick( String className )
@@ -59,7 +60,7 @@ object as "anim", which allows you to stop or manipulate the animation. Here is
:
Ext.ElementSets up event handlers to add and remove a css class when the mouse is over this element Sets up event handlers to add and remove a css class when the mouse is over this element | Element | | addKeyListener( Number/Array/Object/String key , Function fn , [Object scope ] )
:
- Ext.KeyMapConvenience method for constructing a KeyMap Convenience method for constructing a KeyMap Parameters:key : Number/Array/Object/StringEither a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
+ Ext.KeyMap Convenience method for constructing a KeyMap Convenience method for constructing a KeyMap Parameters:key : Number/Array/Object/StringEither a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options:
{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} fn : FunctionThe function to call scope : Object(optional) The scope (this reference) in which the specified function is executed. Defaults to this Element. Returns:Ext.KeyMap The KeyMap created
| Element | | addKeyMap( Object config )
:
Ext.KeyMapCreates a KeyMap for this element Creates a KeyMap for this element Parameters:config : ObjectThe KeyMap config. See Ext.KeyMap for more details Returns:Ext.KeyMap The KeyMap created
| Element | | addListener( String eventName , Function fn , [Object scope ], [Object options ] )
@@ -205,140 +206,136 @@ el.alignTo("other-el", "c-bl", [-6, 0]);Anchors an element to another element and realigns it when the window is resized. Anchors an element to another element and realigns it when the window is resized. Parameters:element : MixedThe element to align to. position : StringThe position to align to. offsets : Array(optional) Offset the positioning by [x, y] animate : Boolean/Object(optional) True for the default animation or a standard Element animation config object monitorScroll : Boolean/Number(optional) True to monitor body scroll and reposition. If this parameter
is a number, it is used as the buffer delay (defaults to 50ms). callback : FunctionThe function to call after the animation finishes Returns: | Element | | animate( Object args , [Float duration ], [Function onComplete ], [String easing ], [String animType ] )
:
- Ext.ElementPerform custom animation on this element.
-<ul class="mdetail-params">
-Animation Properties
-The Animation Control O... Perform custom animation on this element.
-
-- Animation Properties
-The Animation Control Object enables gradual transitions for any member of an
-element's style object that takes a numeric value including but not limited to
-these properties:
-- bottom, top, left, right
-- height, width
-- margin, padding
-- borderWidth
-- opacity
-- fontSize
-- lineHeight
-
-- Animation Property Attributes
-Each Animation Property is a config object with optional properties:
-
-- Animation Types
-The supported animation types:
-- 'run' : Default
-
var el = Ext.get('complexEl');
-el.animate(
- // animation control object
- {
- borderWidth: {to: 3, from: 0},
- opacity: {to: .3, from: 1},
- height: {to: 50, from: el.getHeight()},
- width: {to: 300, from: el.getWidth()},
- top : {by: - 100, unit: 'px'},
- },
- 0.35, // animation duration
- null, // callback
- 'easeOut', // easing method
- 'run' // animation type ('run','color','motion','scroll')
-);
-
-- 'color'
-
Animates transition of background, text, or border colors.
-el.animate(
- // animation control object
- {
- color: { to: '#06e' },
- backgroundColor: { to: '#e06' }
- },
- 0.35, // animation duration
- null, // callback
- 'easeOut', // easing method
- 'color' // animation type ('run','color','motion','scroll')
-);
-
-- 'motion'
-
Animates the motion of an element to/from specific points using optional bezier
-way points during transit.
-el.animate(
- // animation control object
- {
- borderWidth: {to: 3, from: 0},
- opacity: {to: .3, from: 1},
- height: {to: 50, from: el.getHeight()},
- width: {to: 300, from: el.getWidth()},
- top : {by: - 100, unit: 'px'},
- points: {
- to: [50, 100], // go to this point
- control: [ // optional bezier way points
- [ 600, 800],
- [-100, 200]
- ]
- }
- },
- 3000, // animation duration (milliseconds!)
- null, // callback
- 'easeOut', // easing method
- 'motion' // animation type ('run','color','motion','scroll')
-);
-
-- 'scroll'
-
Animate horizontal or vertical scrolling of an overflowing page element.
-el.animate(
- // animation control object
- {
- scroll: {to: [400, 300]}
- },
- 0.35, // animation duration
- null, // callback
- 'easeOut', // easing method
- 'scroll' // animation type ('run','color','motion','scroll')
-);
-
-
- Parameters:args : ObjectThe animation control args duration : Float(optional) How long the animation lasts in seconds (defaults to .35) onComplete : Function(optional) Function to call when animation completes easing : StringanimType : String(optional) 'run' is the default. Can also be 'color',
+ Ext.Element Perform custom animation on this element.
+<ul class="mdetail-params">
+Animation Properties
+The Animation Control Obje... Perform custom animation on this element.
+
+- Animation Properties
+The Animation Control Object enables gradual transitions for any member of an
+element's style object that takes a numeric value including but not limited to
+these properties:
+- bottom, top, left, right
+- height, width
+- margin, padding
+- borderWidth
+- opacity
+- fontSize
+- lineHeight
+
+- Animation Property Attributes
+Each Animation Property is a config object with optional properties:
+
+- Animation Types
+The supported animation types:
+- 'run' : Default
+
var el = Ext.get('complexEl');
+el.animate(
+ // animation control object
+ {
+ borderWidth: {to: 3, from: 0},
+ opacity: {to: .3, from: 1},
+ height: {to: 50, from: el.getHeight()},
+ width: {to: 300, from: el.getWidth()},
+ top : {by: - 100, unit: 'px'},
+ },
+ 0.35, // animation duration
+ null, // callback
+ 'easeOut', // easing method
+ 'run' // animation type ('run','color','motion','scroll')
+);
+
+- 'color'
+
Animates transition of background, text, or border colors.
+el.animate(
+ // animation control object
+ {
+ color: { to: '#06e' },
+ backgroundColor: { to: '#e06' }
+ },
+ 0.35, // animation duration
+ null, // callback
+ 'easeOut', // easing method
+ 'color' // animation type ('run','color','motion','scroll')
+);
+
+- 'motion'
+
Animates the motion of an element to/from specific points using optional bezier
+way points during transit.
+el.animate(
+ // animation control object
+ {
+ borderWidth: {to: 3, from: 0},
+ opacity: {to: .3, from: 1},
+ height: {to: 50, from: el.getHeight()},
+ width: {to: 300, from: el.getWidth()},
+ top : {by: - 100, unit: 'px'},
+ points: {
+ to: [50, 100], // go to this point
+ control: [ // optional bezier way points
+ [ 600, 800],
+ [-100, 200]
+ ]
+ }
+ },
+ 3000, // animation duration (milliseconds!)
+ null, // callback
+ 'easeOut', // easing method
+ 'motion' // animation type ('run','color','motion','scroll')
+);
+
+- 'scroll'
+
Animate horizontal or vertical scrolling of an overflowing page element.
+el.animate(
+ // animation control object
+ {
+ scroll: {to: [400, 300]}
+ },
+ 0.35, // animation duration
+ null, // callback
+ 'easeOut', // easing method
+ 'scroll' // animation type ('run','color','motion','scroll')
+);
+
+
+ Parameters:args : ObjectThe animation control args duration : Float(optional) How long the animation lasts in seconds (defaults to .35) onComplete : Function(optional) Function to call when animation completes easing : StringanimType : String(optional) 'run' is the default. Can also be 'color',
'motion', or 'scroll' Returns:
| Element | | appendChild( String/HTMLElement/Array/Element/CompositeElement el )
:
Ext.ElementAppends the passed element(s) to this element Appends the passed element(s) to this element Parameters:el : String/HTMLElement/Array/Element/CompositeElement Returns: | Element | | appendTo( Mixed el )
:
Ext.ElementAppends this element to the passed element Appends this element to the passed element Parameters:el : MixedThe new parent element Returns: | Element | | applyStyles( String/Object/Function styles )
:
- Ext.ElementMore flexible version of setStyle for setting style properties. More flexible version of setStyle for setting style properties. Parameters:styles : String/Object/FunctionA style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
-a function which returns such a specification. Returns: | Element | | autoHeight( [Boolean animate ], [Float duration ], [Function onComplete ], [String easing ] )
- :
- Ext.ElementMeasures the element's content height and updates height to match. Note: this function uses setTimeout so
-the new he... Measures the element's content height and updates height to match. Note: this function uses setTimeout so
-the new height may not be available immediately. Parameters:animate : Boolean(optional) Animate the transition (defaults to false) duration : Float(optional) Length of the animation in seconds (defaults to .35) onComplete : Function(optional) Function to call when animation completes easing : String(optional) Easing method to use (defaults to easeOut) Returns: | Element | | blur()
+ Ext.ElementMore flexible version of setStyle for setting style properties. More flexible version of setStyle for setting style properties. Parameters:styles : String/Object/FunctionA style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
+a function which returns such a specification. Returns: | Element | | blur()
:
Ext.ElementTries to blur the element. Any exceptions are caught and ignored. Tries to blur the element. Any exceptions are caught and ignored. | Element | | boxWrap( [String class ] )
:
- Ext.ElementWraps the specified element with a special 9 element markup/CSS block that renders by default as
-a gray container wi... Wraps the specified element with a special 9 element markup/CSS block that renders by default as
-a gray container with a gradient background, rounded corners and a 4-way shadow.
- This special markup is used throughout Ext when box wrapping elements (Ext.Button,
-Ext.Panel when frame=true, Ext.Window). The markup
-is of this form:
- Ext.Element.boxMarkup =
- '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div>
- <div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div>
- <div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
- Example usage:
- // Basic box wrap
- Ext.get("foo").boxWrap();
-
- // You can also add a custom class and use CSS inheritance rules to customize the box look.
- // 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
- // for how to create a custom box wrap style.
- Ext.get("foo").boxWrap().addClass("x-box-blue");
Parameters:class : String(optional) A base CSS class to apply to the containing wrapper element
-(defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on
-this name to make the overall effect work, so if you supply an alternate base class, make sure you
+ Ext.Element Wraps the specified element with a special 9 element markup/CSS block that renders by default as
+a gray container wit... Wraps the specified element with a special 9 element markup/CSS block that renders by default as
+a gray container with a gradient background, rounded corners and a 4-way shadow.
+ This special markup is used throughout Ext when box wrapping elements (Ext.Button,
+Ext.Panel when frame=true, Ext.Window). The markup
+is of this form:
+ Ext.Element.boxMarkup =
+ '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div>
+ <div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div>
+ <div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
+ Example usage:
+ // Basic box wrap
+ Ext.get("foo").boxWrap();
+
+ // You can also add a custom class and use CSS inheritance rules to customize the box look.
+ // 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
+ // for how to create a custom box wrap style.
+ Ext.get("foo").boxWrap().addClass("x-box-blue");
Parameters:class : String(optional) A base CSS class to apply to the containing wrapper element
+(defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on
+this name to make the overall effect work, so if you supply an alternate base class, make sure you
also supply all of the necessary rules. Returns:
| Element | | center( [Mixed centerIn ] )
:
voidCenters the Element in either the viewport, or another Element. Centers the Element in either the viewport, or another Element. | Element | | child( String selector , [Boolean returnDom ] )
@@ -358,13 +355,13 @@ need to force a reclean, you can pass true.Returns:Returns true if this element is an ancestor of the passed element Returns true if this element is an ancestor of the passed element Parameters:el : HTMLElement/StringThe element to check Returns: | Element | | createChild( Object config , [HTMLElement insertBefore ], [Boolean returnDom ] )
:
- Ext.ElementCreates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child e... Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element. Parameters:config : ObjectDomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be
+ Ext.Element Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child e... Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element. Parameters:config : ObjectDomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be
automatically generated with the specified attributes. insertBefore : HTMLElement(optional) a child element of this element returnDom : Boolean(optional) true to return the dom node instead of creating an Element Returns:Ext.Element The new child element
| Element | | createProxy( String/Object config , [String/HTMLElement renderTo ], [Boolean matchBox ] )
:
Ext.ElementCreates a proxy element of this element Creates a proxy element of this element Parameters:config : String/ObjectThe class name of the proxy element or a DomHelper config object renderTo : String/HTMLElement(optional) The element or element id to render the proxy to (defaults to document.body) matchBox : Boolean(optional) True to align and size the proxy to this element now (defaults to false) Returns:Ext.Element The new proxy element
| Element | | createShim()
:
- Ext.ElementCreates an iframe shim for this element to keep selects and other windowed objects from
-showing through. Creates an iframe shim for this element to keep selects and other windowed objects from
+ Ext.Element Creates an iframe shim for this element to keep selects and other windowed objects from
+showing through. Creates an iframe shim for this element to keep selects and other windowed objects from
showing through. Parameters:Returns:Ext.Element The new shim element
| Element | | down( String selector , [Boolean returnDom ] )
:
HTMLElement/Ext.ElementSelects a single *direct* child based on the passed CSS selector (the selector should not contain an id). Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id). | Element | | enableDisplayMode( [String display ] )
@@ -373,7 +370,7 @@ showing through.Parameters:-
:
HTMLElement
Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:fi... Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) Parameters:selector : StringThe simple selector to test maxDepth : Number/Mixed(optional) The max depth to search as a number or element (defaults to 50 || document.body) returnEl : Boolean(optional) True to return a Ext.Element object instead of DOM node Returns:
| Element | | findParentNode( String selector , [Number/Mixed maxDepth ], [Boolean returnEl ] )
:
- HTMLElementLooks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) | Element | | first( [String selector ], [Boolean returnDom ] )
:
Ext.Element/HTMLElementGets the first child, skipping text nodes Gets the first child, skipping text nodes Parameters:Returns:Ext.Element/HTMLElement The first child or null
| Element | | fly( String/HTMLElement el , [String named ] )
@@ -414,19 +411,19 @@ passing 'lr' would get the border left width + the border
:
NumberGets the bottom Y coordinate of the element (element Y position + element height) Gets the bottom Y coordinate of the element (element Y position + element height) | Element | | getBox( [Boolean contentBox ], [Boolean local ] )
:
- ObjectReturn an object defining the area of this Element which can be passed to setBox to
-set another Element's size/locat... Return an object defining the area of this Element which can be passed to setBox to
-set another Element's size/location to match this element. Parameters:Returns:Object box An object in the format<pre><code>
-{
- x: <Element's X position>,
- y: <Element's Y position>,
- width: <Element's width>,
- height: <Element's height>,
- bottom: <Element's lower bound>,
- right: <Element's rightmost bound>
-}
-</code></pre>
-The returned object may also be addressed as an Array where index 0 contains the X position
+ Object Return an object defining the area of this Element which can be passed to setBox to
+set another Element's size/locati... Return an object defining the area of this Element which can be passed to setBox to
+set another Element's size/location to match this element. Parameters:Returns:Object box An object in the format<pre><code>
+{
+ x: <Element's X position>,
+ y: <Element's Y position>,
+ width: <Element's width>,
+ height: <Element's height>,
+ bottom: <Element's lower bound>,
+ right: <Element's rightmost bound>
+}
+</code></pre>
+The returned object may also be addressed as an Array where index 0 contains the X position
and index 1 contains the Y position. So the result may also be used for {@link #setXY}
| Element | | getCenterXY()
:
ArrayCalculates the x, y to center this element on the screen Calculates the x, y to center this element on the screen Parameters:Returns:Array The x, y values [x, y]
| Element | | getColor( String attr , String defaultValue , [String prefix ] )
@@ -436,25 +433,25 @@ are convert to standa...Return the CSS color for the spe
are convert to standard 6 digit hex color. | Element | | getComputedHeight()
:
- NumberReturns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
-whe... Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
-when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements
+ Number Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
+when... Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders
+when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements
if a height has not been set using CSS. | Element | | getComputedWidth()
:
- NumberReturns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
-when n... Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
-when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements
+ Number Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
+when ne... Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders
+when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements
if a width has not been set using CSS. | Element | | getFrameWidth( String sides )
:
- NumberReturns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
- for more info... Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
+ Number Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
+ for more infor... Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth()
for more information about the sides. | Element | | getHeight( [Boolean contentHeight ] )
:
NumberReturns the offset height of the element Returns the offset height of the element Parameters:Returns:Number The element's height
| Element | | getLeft( Boolean local )
:
NumberGets the left X coordinate Gets the left X coordinate | Element | | getMargins( [String sides ] )
:
- Object/NumberReturns an object with properties top, left, right and bottom representing the margins of this element unless sides i... Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
+ Object/Number Returns an object with properties top, left, right and bottom representing the margins of this element unless sides i... Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,
then it returns the calculated width of the sides (see getPadding) | Element | | getOffsetsTo( Mixed element )
:
ArrayReturns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have d... Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates. | Element | | getPadding( String side )
@@ -462,12 +459,12 @@ then it returns the calculated width of the sides (see getPadding)Gets the width of the padding(s) for the specified side(s) Gets the width of the padding(s) for the specified side(s) Parameters:side : StringCan be t, l, r, b or any combination of those to add multiple values. For example,
passing 'lr' would get the padding left + the padding right. Returns: | Element | | getPositioning()
:
- ObjectGets an object with all CSS positioning properties. Useful along with setPostioning to get
-snapshot before performin... Gets an object with all CSS positioning properties. Useful along with setPostioning to get
+ Object Gets an object with all CSS positioning properties. Useful along with setPostioning to get
+snapshot before performing... Gets an object with all CSS positioning properties. Useful along with setPostioning to get
snapshot before performing an update and then restoring the element. | Element | | getRegion()
:
- RegionReturns the region of the given element.
-The element must be part of the DOM tree to have a region (display:none or ... Returns the region of the given element.
+ Region Returns the region of the given element.
+The element must be part of the DOM tree to have a region (display:none or e... Returns the region of the given element.
The element must be part of the DOM tree to have a region (display:none or elements not appended return false). | Element | | getRight( Boolean local )
:
NumberGets the right X coordinate of the element (element X position + element width) Gets the right X coordinate of the element (element X position + element width) | Element | | getScroll()
@@ -478,15 +475,15 @@ The element must be part of the DOM tree to have a region (display:none or eleme
:
StringNormalizes currentStyle and computedStyle. Normalizes currentStyle and computedStyle. | Element | | getStyleSize()
:
- voidReturns the dimensions of the element available to lay content out in.
-getStyleSize utilizes prefers style sizing if... Returns the dimensions of the element available to lay content out in.
-getStyleSize utilizes prefers style sizing if present, otherwise it chooses the larger of offsetHeight/clientHeight and offsetWidth/clientWidth.
-To obtain the size excluding scrollbars, use getViewSize
+ void Returns the dimensions of the element available to lay content out in.
+getStyleSize utilizes prefers style sizing if ... Returns the dimensions of the element available to lay content out in.
+getStyleSize utilizes prefers style sizing if present, otherwise it chooses the larger of offsetHeight/clientHeight and offsetWidth/clientWidth.
+To obtain the size excluding scrollbars, use getViewSize
Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. | Element | | getStyles( String style1 , String style2 , String etc. )
:
- ObjectReturns an object with properties matching the styles requested.
-For example, el.getStyles('color', 'font-size', 'wi... Returns an object with properties matching the styles requested.
-For example, el.getStyles('color', 'font-size', 'width') might return
+ Object Returns an object with properties matching the styles requested.
+For example, el.getStyles('color', 'font-size', 'wid... Returns an object with properties matching the styles requested.
+For example, el.getStyles('color', 'font-size', 'width') might return
{'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}. Parameters:style1 : StringA style name style2 : StringA style name etc. : String Returns: | Element | | getTextWidth( String text , [Number min ], [Number max ] )
:
NumberReturns the width in pixels of the passed text, or the width of the text in this Element. Returns the width in pixels of the passed text, or the width of the text in this Element. Parameters:text : StringThe text to measure. Defaults to the innerHTML of the element. min : Number(Optional) The minumum value to return. max : Number(Optional) The maximum value to return. Returns: | Element | | getTop( Boolean local )
@@ -497,19 +494,19 @@ For example, el.getStyles('color', 'font-size', 'width') might return
:
String/NumberReturns the value of the "value" attribute Returns the value of the "value" attribute | Element | | getViewSize()
:
- voidReturns the dimensions of the element available to lay content out in.
-If the element (or any ancestor element) has ... Returns the dimensions of the element available to lay content out in.
- If the element (or any ancestor element) has CSS style display : none , the dimensions will be zero.
-example: var vpSize = Ext.getBody().getViewSize();
-
- // all Windows created afterwards will have a default value of 90% height and 95% width
- Ext.Window.override({
- width: vpSize.width * 0.9,
- height: vpSize.height * 0.95
- });
- // To handle window resizing you would have to hook onto onWindowResize.
-getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars.
-To obtain the size including scrollbars, use getStyleSize
+ void Returns the dimensions of the element available to lay content out in.
+If the element (or any ancestor element) has C... Returns the dimensions of the element available to lay content out in.
+ If the element (or any ancestor element) has CSS style display : none , the dimensions will be zero.
+example: var vpSize = Ext.getBody().getViewSize();
+
+ // all Windows created afterwards will have a default value of 90% height and 95% width
+ Ext.Window.override({
+ width: vpSize.width * 0.9,
+ height: vpSize.height * 0.95
+ });
+ // To handle window resizing you would have to hook onto onWindowResize.
+getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars.
+To obtain the size including scrollbars, use getStyleSize
Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. | Element | | getWidth( [Boolean contentWidth ] )
:
NumberReturns the offset width of the element Returns the offset width of the element Parameters:Returns:Number The element's width
| Element | | getX()
@@ -518,7 +515,12 @@ Sizing of the document body is handled at the adapter level which handles specia
:
ArrayGets the current position of the element based on page coordinates. Element must be part of the DOM tree to have pag... Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). | Element | | getY()
:
- NumberGets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have p... Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). | Element | | hasClass( String className )
+ NumberGets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have p... Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). | Element | | handleError( Object/Error e )
+ :
+ voidFramework-wide error-handler. Developers can override this method to provide
+custom exception-handling. Framework e... Framework-wide error-handler. Developers can override this method to provide
+custom exception-handling. Framework errors will often extend from the base
+Ext.Error class. | Element | | hasClass( String className )
:
BooleanChecks if the specified CSS class exists on this element's DOM node. Checks if the specified CSS class exists on this element's DOM node. | Element | | hide( [Boolean/Object animate ] )
:
@@ -560,14 +562,14 @@ Sizing of the document body is handled at the adapter level which handles specia
parameter as Ext.Updater.upd... | Element | | mask( [String msg ], [String msgCls ] )
:
- ElementPuts a mask over this element to disable user interaction. Requires core.css.
-This method can only be applied to ele... Puts a mask over this element to disable user interaction. Requires core.css.
+ Element Puts a mask over this element to disable user interaction. Requires core.css.
+This method can only be applied to elem... Puts a mask over this element to disable user interaction. Requires core.css.
This method can only be applied to elements which accept child nodes. | Element | | move( String direction , Number distance , [Boolean/Object animate ] )
:
Ext.ElementMove this element relative to its current position. Move this element relative to its current position. Parameters:direction : StringPossible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down"). distance : NumberHow far to move the element in pixels animate : Boolean/Object(optional) true for the default animation or a standard Element animation config object Returns: | Element | | moveTo( Number x , Number y , [Boolean/Object animate ] )
:
- Ext.ElementSets the position of the element in page coordinates, regardless of how the element is positioned.
-The element must ... Sets the position of the element in page coordinates, regardless of how the element is positioned.
+ Ext.Element Sets the position of the element in page coordinates, regardless of how the element is positioned.
+The element must b... Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). Parameters:x : NumberX value for new position (coordinates are page-based) y : NumberY value for new position (coordinates are page-based) animate : Boolean/Object(optional) True for the default animation, or a standard Element animation config object Returns: | Element | | next( [String selector ], [Boolean returnDom ] )
:
Ext.Element/HTMLElementGets the next sibling, skipping text nodes Gets the next sibling, skipping text nodes Parameters:Returns:Ext.Element/HTMLElement The next sibling or null
| Element | | on( String eventName , Function fn , [Object scope ], [Object options ] )
@@ -576,8 +578,8 @@ The element must be part of the DOM tree to have page coordinates (display:none
:
Ext.Element/HTMLElementGets the parent node for this element, optionally chaining up trying to match a selector Gets the parent node for this element, optionally chaining up trying to match a selector Parameters:Returns:Ext.Element/HTMLElement The parent node or null
| Element | | position( [String pos ], [Number zIndex ], [Number x ], [Number y ] )
:
- voidInitializes positioning on this element. If a desired position is not passed, it will make the
-the element positione... Initializes positioning on this element. If a desired position is not passed, it will make the
+ void Initializes positioning on this element. If a desired position is not passed, it will make the
+the element positioned... Initializes positioning on this element. If a desired position is not passed, it will make the
the element positioned relative IF it is not already positioned. Parameters:pos : String(optional) Positioning to use "relative", "absolute" or "fixed" zIndex : Number(optional) The zIndex to apply x : Number(optional) Set the page X position y : Number(optional) Set the page Y position Returns: | Element | | prev( [String selector ], [Boolean returnDom ] )
:
Ext.Element/HTMLElementGets the previous sibling, skipping text nodes Gets the previous sibling, skipping text nodes | Element | | purgeAllListeners()
@@ -619,31 +621,28 @@ then this must refer to the same object.Returns: Replaces this element with the passed element Replaces this element with the passed element | Element | | scroll( String direction , Number distance , [Boolean/Object animate ] )
:
- BooleanScrolls this element the specified direction. Does bounds checking to make sure the scroll is
-within this element's ... Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
-within this element's scrollable range. Parameters:direction : StringPossible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down"). distance : NumberHow far to scroll the element in pixels animate : Boolean/Object(optional) true for the default animation or a standard Element animation config object Returns:Boolean Returns true if a scroll was triggered or false if the element
+ Boolean Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
+within this element's s... Scrolls this element the specified direction. Does bounds checking to make sure the scroll is
+within this element's scrollable range. Parameters:direction : StringPossible values are: "l" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "down"). distance : NumberHow far to scroll the element in pixels animate : Boolean/Object(optional) true for the default animation or a standard Element animation config object Returns:
| Element | | scrollIntoView( [Mixed container ], [Boolean hscroll ] )
:
- Ext.ElementScrolls this element into view within the passed container. Scrolls this element into view within the passed container. Parameters:container : Mixed(optional) The container element to scroll (defaults to document.body). Should be a
-string (id), dom node, or Ext.Element. hscroll : Boolean(optional) False to disable horizontal scroll (defaults to true) Returns: | Element | | scrollTo( String side , Number value )
+ Ext.ElementScrolls this element into view within the passed container. Scrolls this element into view within the passed container. Parameters:container : Mixed(optional) The container element to scroll (defaults to document.body). Should be a
+string (id), dom node, or Ext.Element. hscroll : Boolean(optional) False to disable horizontal scroll (defaults to true) Returns: | Element | | scrollTo( String side , Number value , [Boolean/Object animate ] )
:
- ElementScrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it ... Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll(). | Element | | select( String/Array selector , [Boolean unique ], [HTMLElement/String root ] )
+ ElementScrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it ... Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll(). | Element | | select( String selector , [Boolean unique ] )
:
- CompositeElementLite/CompositeElementSelects elements based on the passed CSS selector to enable Element methods
-to be applied to many related elements i... Selects elements based on the passed CSS selector to enable Element methods
-to be applied to many related elements in one statement through the returned CompositeElement or
- CompositeElementLite object. Parameters:selector : String/ArrayThe CSS selector or an array of elements unique : Boolean(optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) root : HTMLElement/String(optional) The root element of the query or id of the root Returns:CompositeElementLite/CompositeElement
| Element | | set( Object o , [Boolean useSet ] )
+ CompositeElement/CompositeElementLiteCreates a Ext.CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an i... Creates a Ext.CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id). Parameters:Returns:CompositeElement/CompositeElementLite The composite element
| Element | | set( Object o , [Boolean useSet ] )
:
Ext.ElementSets the passed attributes as attributes of this element (a style attribute can be a string, object or function) Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function) | Element | | setBottom( String bottom )
:
Ext.ElementSets the element's CSS bottom style. Sets the element's CSS bottom style. | Element | | setBounds( Number x , Number y , Mixed width , Mixed height , [Boolean/Object animate ] )
:
- Ext.ElementSets the element's position and size in one shot. If animation is true then width, height, x and y will be animated c... Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently. | Element | | setBox( Object box , [Boolean adjust ], [Boolean/Object animate ] )
:
Ext.ElementSets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x an... Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently. Parameters:box : ObjectThe box to fill {x, y, width, height} adjust : Boolean(optional) Whether to adjust for box-model issues automatically animate : Boolean/Object(optional) true for the default animation or a standard Element animation config object Returns: | Element | | setDisplayed( Mixed value )
@@ -670,8 +669,8 @@ Ext.fly('elId').setHeight(150, {
:
Ext.ElementQuick set left and top adding default units Quick set left and top adding default units | Element | | setLocation( Number x , Number y , [Boolean/Object animate ] )
:
- Ext.ElementSets the position of the element in page coordinates, regardless of how the element is positioned.
-The element must ... Sets the position of the element in page coordinates, regardless of how the element is positioned.
+ Ext.Element Sets the position of the element in page coordinates, regardless of how the element is positioned.
+The element must b... Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). Parameters:x : NumberX value for new position (coordinates are page-based) y : NumberY value for new position (coordinates are page-based) animate : Boolean/Object(optional) True for the default animation, or a standard Element animation config object Returns: | Element | | setOpacity( Float opacity , [Boolean/Object animate ] )
:
Ext.ElementSet the opacity of the element Set the opacity of the element Parameters:opacity : FloatThe new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc animate : Boolean/Object(optional) a standard Element animation config object or true for
@@ -683,25 +682,25 @@ the default animation ({duration: .35, easing: 'easeIn'}) Sets the element's CSS right style. Sets the element's CSS right style.
| Element | | setSize( Mixed width , Mixed height , [Boolean/Object animate ] )
:
- Ext.ElementSet the size of this Element. If animation is true, both width and height will be animated concurrently. Set the size of this Element. If animation is true, both width and height will be animated concurrently. Parameters:width : MixedThe new width. This may be one of:
-- A Number specifying the new width in this Element's defaultUnits (by default, pixels).
-- A String used to set the CSS width style. Animation may not be used.
-
- A size object in the format
{width: widthValue, height: heightValue} .
- height : MixedThe new height. This may be one of:
| Element | | setStyle( String/Object property , [String value ] )
:
Ext.ElementWrapper for setting style properties, also takes single object parameter of multiple styles. Wrapper for setting style properties, also takes single object parameter of multiple styles. Parameters:property : String/ObjectThe style property to be set, or an object of multiple styles. value : String(optional) The value to apply to the given property, or null if an object was passed. Returns: | Element | | setTop( String top )
:
Ext.ElementSets the element's top position directly using CSS style (instead of setY). Sets the element's top position directly using CSS style (instead of setY). | Element | | setVisibilityMode( Number visMode )
:
- Ext.ElementSets the element's visibility mode. When setVisible() is called it
-will use this to determine whether to set the vis... Sets the element's visibility mode. When setVisible() is called it
+ Ext.Element Sets the element's visibility mode. When setVisible() is called it
+will use this to determine whether to set the visi... Sets the element's visibility mode. When setVisible() is called it
will use this to determine whether to set the visibility or the display property. | Element | | setVisible( Boolean visible , [Boolean/Object animate ] )
:
- Ext.ElementSets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
-the d... Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
+ Ext.Element Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
+the di... Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property. Parameters:visible : BooleanWhether the element is visible animate : Boolean/Object(optional) True for the default animation, or a standard Element animation config object Returns: | Element | | setWidth( Mixed width , [Boolean/Object animate ] )
:
Ext.ElementSet the width of this Element. Set the width of this Element. Parameters:width : MixedThe new width. This may be one of:
| Element | | setXY( Array pos , [Boolean/Object animate ] )
:
- Ext.ElementSets the position of the element in page coordinates, regardless of how the element is positioned.
-The element must ... Sets the position of the element in page coordinates, regardless of how the element is positioned.
+ Ext.Element Sets the position of the element in page coordinates, regardless of how the element is positioned.
+The element must b... Sets the position of the element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). Parameters:pos : ArrayContains X & Y [x, y] values for new position (coordinates are page-based) animate : Boolean/Object(optional) True for the default animation, or a standard Element animation config object Returns: | Element | | setY( Number The , [Boolean/Object animate ] )
:
Ext.ElementSets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coor... Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). Parameters:The : NumberY position of the element animate : Boolean/Object(optional) True for the default animation, or a standard Element animation config object Returns: | Element | | show( [Boolean/Object animate ] )
@@ -736,8 +735,8 @@ then this must refer to the same object.Returns:Disables text selection for this element (normalized across browsers) Disables text selection for this element (normalized across browsers) | Element | | up( String selector , [Number/Mixed maxDepth ] )
:
- Ext.ElementWalks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first... Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child).
-This is a shortcut for findParentNode() that always returns an Ext.Element. | Element | | update( String html , [Boolean loadScripts ], [Function callback ] )
:
Ext.ElementUpdate the innerHTML of this element, optionally searching for and processing scripts Update the innerHTML of this element, optionally searching for and processing scripts | Element | | wrap( [Object config ], [Boolean returnDom ] )
|
|