diff options
author | Felix Nagel <info@felixnagel.com> | 2013-03-03 13:48:01 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-03-03 13:48:01 +0100 |
commit | dffe8f66109714af2d4ed8f582af4cf3439433e3 (patch) | |
tree | d83889fc566946bd35e4f8dc866f2aac5e4b095a /ui/jquery.ui.position.js | |
parent | d94e217065745e9ad0638cf68d3d973ffe44035a (diff) | |
parent | 6d3a1e1fe8cc21f385456ea26075f3909136a589 (diff) | |
download | jquery-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.js | 10 |
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 ) { |