X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/src/core/Element.position-more.js diff --git a/src/core/Element.position-more.js b/src/core/Element.position-more.js index 62c497cd..68ca4a07 100644 --- a/src/core/Element.position-more.js +++ b/src/core/Element.position-more.js @@ -1,6 +1,6 @@ /*! - * Ext JS Library 3.0.0 - * Copyright(c) 2006-2009 Ext JS, LLC + * Ext JS Library 3.1.1 + * Copyright(c) 2006-2010 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ @@ -26,13 +26,24 @@ Ext.Element.addMethods({ me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2)); return me; }, - + /** - * Return a box {x, y, width, height} that can be used to set another elements - * size/location to match this element. + * Return an object defining the area of this Element which can be passed to {@link #setBox} to + * set another Element's size/location to match this element. * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned. * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y. - * @return {Object} box An object in the format {x, y, width, height} + * @return {Object} box An object in the format
+{
+ 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>
+}
+
+ * 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}
*/
getBox : function(contentBox, local) {
var me = this,