aboutsummaryrefslogtreecommitdiffstats
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.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 50ef23d5a..8e2bc97f1 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -164,11 +164,14 @@ $.ui.position = {
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ -data.targetWidth,
offset = -2 * data.offset[ 0 ];
position.left += position.left < 0 ?
- myOffset + data.targetWidth + offset :
+ myOffset + atOffset + offset :
over > 0 ?
- myOffset - data.targetWidth + offset :
+ myOffset + atOffset + offset :
0;
},
top: function( position, data ) {
@@ -187,7 +190,7 @@ $.ui.position = {
-data.targetHeight,
offset = -2 * data.offset[ 1 ];
position.top += position.top < 0 ?
- myOffset + data.targetHeight + offset :
+ myOffset + atOffset + offset :
over > 0 ?
myOffset + atOffset + offset :
0;