summaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.position.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.position.js')
-rw-r--r--ui/jquery.ui.position.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index deacedbcc..837f23f40 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Position @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -83,7 +83,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;
}
@@ -103,9 +103,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;
@@ -122,8 +122,8 @@ $.fn.position = function( options ) {
}
// prevent fractions (see #5280)
- position.left = parseInt( position.left );
- position.top = parseInt( position.top );
+ position.left = Math.round( position.left );
+ position.top = Math.round( position.top );
collisionPosition = {
left: position.left - marginLeft,