]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Fixed calculation of collision dimensions. Fixes #6812 - Position: Collisio...
authorScott González <scott.gonzalez@gmail.com>
Wed, 12 Jan 2011 13:43:18 +0000 (08:43 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 12 Jan 2011 13:43:18 +0000 (08:43 -0500)
ui/jquery.ui.position.js

index 3992e1c63a173a46cecaac629436e9e6674e5b94..0d03a455173712943a750e68254815b0708f68e2 100644 (file)
@@ -82,7 +82,7 @@ $.fn.position = function( options ) {
 
        if ( options.at[0] === "right" ) {
                basePosition.left += targetWidth;
-       } else if (options.at[0] === center ) {
+       } else if ( options.at[0] === center ) {
                basePosition.left += targetWidth / 2;
        }
 
@@ -102,9 +102,9 @@ $.fn.position = function( options ) {
                        marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
                        marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
                        collisionWidth = elemWidth + marginLeft +
-                               parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
+                               ( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
                        collisionHeight = elemHeight + marginTop +
-                               parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
+                               ( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
                        position = $.extend( {}, basePosition ),
                        collisionPosition;