X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FElement.js;h=fef561b3145140abed7bbfed148a32be51e9e85a;hb=8a5cbfb877d49d376409b893d50277f13d6f752c;hp=69d4311b2fe65041caaa4eaaa7ec96868fbec05b;hpb=d4ff49ae533caecbe63c0fb4a58b13deae6a1e44;p=roojs1 diff --git a/Roo/Element.js b/Roo/Element.js index 69d4311b2f..fef561b314 100644 --- a/Roo/Element.js +++ b/Roo/Element.js @@ -1548,7 +1548,8 @@ if(opt.anim.isAnimated()){ * @param {Array} offsets (optional) Offset the positioning by [x, y] * @return {Array} [x, y] */ - getAlignToXY : function(el, p, o){ + getAlignToXY : function(el, p, o) + { el = Roo.get(el); var d = this.dom; if(!el.dom){ @@ -1589,7 +1590,7 @@ if(opt.anim.isAnimated()){ //otherwise swap the aligned el to the opposite border of the target. var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); - var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t") ); var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); var doc = document;