<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
- <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
</script>
</head>
<body onload="prettyPrint(); highlight();">
- <pre class="prettyprint lang-js"><span id='Ext-core-Element'>/**
-</span> * @class Ext.core.Element
+ <pre class="prettyprint lang-js"><span id='Ext-Element'>/**
+</span> * @class Ext.Element
*/
-Ext.applyIf(Ext.core.Element, {
+Ext.applyIf(Ext.Element, {
unitRe: /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,
camelRe: /(-[a-z])/gi,
opacityRe: /alpha\(opacity=(.*)\)/i,
margins: {l: 'margin-left', r: 'margin-right', t: 'margin-top', b: 'margin-bottom'},
// Reference the prototype's version of the method. Signatures are identical.
- addUnits : Ext.core.Element.prototype.addUnits,
+ addUnits : Ext.Element.prototype.addUnits,
-<span id='Ext-core-Element-method-parseBox'> /**
+<span id='Ext-Element-static-method-parseBox'> /**
</span> * 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)
* @static
- * @param {Number|String} box The encoded margins
+ * @param {Number/String} box The encoded margins
* @return {Object} An object with margin sizes for top, right, bottom and left
*/
parseBox : function(box) {
},
-<span id='Ext-core-Element-method-unitizeBox'> /**
+<span id='Ext-Element-static-method-unitizeBox'> /**
</span> * 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)
* @static
- * @param {Number|String} box The encoded margins
+ * @param {Number/String} box The encoded margins
* @param {String} units The type of units to add
* @return {String} An string with unitized (px if units is not specified) metrics for top, right, bottom and left
*/
return a.charAt(1).toUpperCase();
},
-<span id='Ext-core-Element-method-normalize'> /**
+<span id='Ext-Element-static-method-normalize'> /**
</span> * Normalizes CSS property keys from dash delimited to camel case JavaScript Syntax.
* For example:
* <ul>
return this.propertyCache[prop] || (this.propertyCache[prop] = prop.replace(this.camelRe, this.camelReplaceFn));
},
-<span id='Ext-core-Element-method-getDocumentHeight'> /**
+<span id='Ext-Element-static-method-getDocumentHeight'> /**
</span> * Retrieves the document height
* @static
* @return {Number} documentHeight
return Math.max(!Ext.isStrict ? document.body.scrollHeight : document.documentElement.scrollHeight, this.getViewportHeight());
},
-<span id='Ext-core-Element-method-getDocumentWidth'> /**
+<span id='Ext-Element-static-method-getDocumentWidth'> /**
</span> * Retrieves the document width
* @static
* @return {Number} documentWidth
return Math.max(!Ext.isStrict ? document.body.scrollWidth : document.documentElement.scrollWidth, this.getViewportWidth());
},
-<span id='Ext-core-Element-method-getViewportHeight'> /**
+<span id='Ext-Element-static-method-getViewportHeight'> /**
</span> * Retrieves the viewport height of the window.
* @static
* @return {Number} viewportHeight
return window.innerHeight;
},
-<span id='Ext-core-Element-method-getViewportWidth'> /**
+<span id='Ext-Element-static-method-getViewportWidth'> /**
</span> * Retrieves the viewport width of the window.
* @static
* @return {Number} viewportWidth
return window.innerWidth;
},
-<span id='Ext-core-Element-method-getViewSize'> /**
+<span id='Ext-Element-static-method-getViewSize'> /**
</span> * Retrieves the viewport size of the window.
* @static
* @return {Object} object containing width and height properties
};
},
-<span id='Ext-core-Element-method-getOrientation'> /**
+<span id='Ext-Element-static-method-getOrientation'> /**
</span> * Retrieves the current orientation of the window. This is calculated by
* determing if the height is greater than the width.
* @static
return (window.innerHeight > window.innerWidth) ? 'portrait' : 'landscape';
},
-<span id='Ext-core-Element-method-fromPoint'> /**
+<span id='Ext-Element-static-method-fromPoint'> /**
</span> * Returns the top Element that is located at the passed coordinates
* @static
* @param {Number} x The x coordinate
- * @param {Number} x The y coordinate
+ * @param {Number} y The y coordinate
* @return {String} The found Element
*/
fromPoint: function(x, y) {
return Ext.get(document.elementFromPoint(x, y));
},
-<span id='Ext-core-Element-method-parseStyles'> /**
+<span id='Ext-Element-static-method-parseStyles'> /**
</span> * Converts a CSS string into an object with a property for each style.
* <p>
* The sample code below would return an object with 2 properties, one
* for background-color and one for color.</p>
* <pre><code>
var css = 'background-color: red;color: blue; ';
-console.log(Ext.core.Element.parseStyles(css));
+console.log(Ext.Element.parseStyles(css));
* </code></pre>
* @static
* @param {String} styles A CSS string