- <div id="method-Ext.Element-getMargins"></div>/**\r
- * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,\r
- * then it returns the calculated width of the sides (see getPadding)\r
- * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides\r
- * @return {Object/Number}\r
- */\r
- getMargins : function(side){\r
- var me = this,\r
- key,\r
- hash = {t:"top", l:"left", r:"right", b: "bottom"},\r
- o = {};\r
+ <div id="method-Ext.Element-getSize"></div>/**\r
+ * Returns the size of the element.\r
+ * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding\r
+ * @return {Object} An object containing the element's size {width: (element width), height: (element height)}\r
+ */\r
+ getSize : function(contentSize){\r
+ return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)};\r
+ },\r
+\r
+ <div id="method-Ext.Element-repaint"></div>/**\r
+ * Forces the browser to repaint this element\r
+ * @return {Ext.Element} this\r
+ */\r
+ repaint : function(){\r
+ var dom = this.dom;\r
+ this.addClass("x-repaint");\r
+ setTimeout(function(){\r
+ Ext.fly(dom).removeClass("x-repaint");\r
+ }, 1);\r
+ return this;\r
+ },\r
+\r
+ <div id="method-Ext.Element-unselectable"></div>/**\r
+ * Disables text selection for this element (normalized across browsers)\r
+ * @return {Ext.Element} this\r
+ */\r
+ unselectable : function(){\r
+ this.dom.unselectable = "on";\r
+ return this.swallowEvent("selectstart", true).\r
+ applyStyles("-moz-user-select:none;-khtml-user-select:none;").\r
+ addClass("x-unselectable");\r
+ },\r
+\r
+ <div id="method-Ext.Element-getMargins"></div>/**\r
+ * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed,\r
+ * then it returns the calculated width of the sides (see getPadding)\r
+ * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides\r
+ * @return {Object/Number}\r
+ */\r
+ getMargins : function(side){\r
+ var me = this,\r
+ key,\r
+ hash = {t:"top", l:"left", r:"right", b: "bottom"},\r
+ o = {};\r