X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..b37ceabb82336ee82757cd32efe353cfab8ec267:/docs/source/Element.alignment.html diff --git a/docs/source/Element.alignment.html b/docs/source/Element.alignment.html index 0f5cd895..d4ef558d 100644 --- a/docs/source/Element.alignment.html +++ b/docs/source/Element.alignment.html @@ -1,12 +1,18 @@ - -
- -/** + + + ++ \ No newline at end of fileThe source code + + + + +/*! + * Ext JS Library 3.2.2 + * Copyright(c) 2006-2010 Ext JS, Inc. + * licensing@extjs.com + * http://www.extjs.com/license + */ +/** * @class Ext.Element */ Ext.Element.addMethods({ @@ -308,12 +314,13 @@ el.alignTo("other-el", "c-bl", [-6, 0]); vw -= offsets.right; vh -= offsets.bottom; - var vr = vx+vw; - var vb = vy+vh; - - var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); - var x = xy[0], y = xy[1]; - var w = this.dom.offsetWidth, h = this.dom.offsetHeight; + var vr = vx + vw, + vb = vy + vh, + xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]), + x = xy[0], y = xy[1], + offset = this.getConstrainOffset(), + w = this.dom.offsetWidth + offset, + h = this.dom.offsetHeight + offset; // only move it if it needs it var moved = false; @@ -394,6 +401,11 @@ el.alignTo("other-el", "c-bl", [-6, 0]); // } // return moved ? [x, y] : false; // }, + + // private, used internally + getConstrainOffset : function(){ + return 0; + }, /** * Calculates the x, y to center this element on the screen @@ -411,6 +423,6 @@ el.alignTo("other-el", "c-bl", [-6, 0]); return this.alignTo(centerIn || document, 'c-c'); } }); -- +