aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-04-24 17:50:52 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-04-24 17:50:52 +0200
commitc660d679b1215004f3eb27d09a4f0059b0fd9b34 (patch)
treee9c47658c5966ce3500c70754d5b4e2bfa3ff25b /ui
parentdb72cb7e944552ee54854834e3a73602f1f4818a (diff)
downloadjquery-ui-c660d679b1215004f3eb27d09a4f0059b0fd9b34.tar.gz
jquery-ui-c660d679b1215004f3eb27d09a4f0059b0fd9b34.zip
Position: Remove at-center guards, take at:center into account instead. Fixes #8127 - collision:flip should be supported for at:center
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.position.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index d4d09bee4..cb82cd4f1 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -358,10 +358,6 @@ $.ui.position = {
},
flip: {
left: function( position, data ) {
- if ( data.at[ 0 ] === "center" ) {
- return;
- }
-
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
@@ -377,7 +373,9 @@ $.ui.position = {
0,
atOffset = data.at[ 0 ] === "left" ?
data.targetWidth :
- -data.targetWidth,
+ data.at[ 0 ] === "right" ?
+ -data.targetWidth :
+ 0,
offset = -2 * data.offset[ 0 ],
newOverRight,
newOverLeft;
@@ -396,10 +394,6 @@ $.ui.position = {
}
},
top: function( position, data ) {
- if ( data.at[ 1 ] === "center" ) {
- return;
- }
-
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
@@ -415,7 +409,9 @@ $.ui.position = {
0,
atOffset = data.at[ 1 ] === "top" ?
data.targetHeight :
- -data.targetHeight,
+ data.at[ 1 ] === "bottom" ?
+ -data.targetHeight :
+ 0,
offset = -2 * data.offset[ 1 ],
newOverTop,
newOverBottom;