aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.position.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-03-03 13:48:01 +0100
committerFelix Nagel <info@felixnagel.com>2013-03-03 13:48:01 +0100
commitdffe8f66109714af2d4ed8f582af4cf3439433e3 (patch)
treed83889fc566946bd35e4f8dc866f2aac5e4b095a /ui/jquery.ui.position.js
parentd94e217065745e9ad0638cf68d3d973ffe44035a (diff)
parent6d3a1e1fe8cc21f385456ea26075f3909136a589 (diff)
downloadjquery-ui-dffe8f66109714af2d4ed8f582af4cf3439433e3.tar.gz
jquery-ui-dffe8f66109714af2d4ed8f582af4cf3439433e3.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.position.js')
-rw-r--r--ui/jquery.ui.position.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 0209b442c..2d3451c06 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -18,15 +18,15 @@ var cachedScrollbarWidth,
round = Math.round,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+%?/,
+ roffset = /[\+\-]\d+(\.[\d]+)?%?/,
rposition = /^\w+/,
rpercent = /%$/,
_position = $.fn.position;
function getOffsets( offsets, width, height ) {
return [
- parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+ parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+ parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
];
}
@@ -95,8 +95,8 @@ $.position = {
hasOverflowY = overflowY === "scroll" ||
( overflowY === "auto" && within.height < within.element[0].scrollHeight );
return {
- width: hasOverflowX ? $.position.scrollbarWidth() : 0,
- height: hasOverflowY ? $.position.scrollbarWidth() : 0
+ width: hasOverflowY ? $.position.scrollbarWidth() : 0,
+ height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
},
getWithinInfo: function( element ) {