@@ -358,10 +358,6 @@ $.ui.position = {
358
358
} ,
359
359
flip : {
360
360
left : function ( position , data ) {
361
- if ( data . at [ 0 ] === "center" ) {
362
- return ;
363
- }
364
-
365
361
var within = data . within ,
366
362
withinOffset = within . offset . left + within . scrollLeft ,
367
363
outerWidth = within . width ,
@@ -377,7 +373,9 @@ $.ui.position = {
377
373
0 ,
378
374
atOffset = data . at [ 0 ] === "left" ?
379
375
data . targetWidth :
380
- - data . targetWidth ,
376
+ data . at [ 0 ] === "right" ?
377
+ - data . targetWidth :
378
+ 0 ,
381
379
offset = - 2 * data . offset [ 0 ] ,
382
380
newOverRight ,
383
381
newOverLeft ;
@@ -396,10 +394,6 @@ $.ui.position = {
396
394
}
397
395
} ,
398
396
top : function ( position , data ) {
399
- if ( data . at [ 1 ] === "center" ) {
400
- return ;
401
- }
402
-
403
397
var within = data . within ,
404
398
withinOffset = within . offset . top + within . scrollTop ,
405
399
outerHeight = within . height ,
@@ -415,7 +409,9 @@ $.ui.position = {
415
409
0 ,
416
410
atOffset = data . at [ 1 ] === "top" ?
417
411
data . targetHeight :
418
- - data . targetHeight ,
412
+ data . at [ 1 ] === "bottom" ?
413
+ - data . targetHeight :
414
+ 0 ,
419
415
offset = - 2 * data . offset [ 1 ] ,
420
416
newOverTop ,
421
417
newOverBottom ;
0 commit comments