@@ -105,7 +105,9 @@ $.position = {
105
105
return cachedScrollbarWidth ;
106
106
}
107
107
var w1 , w2 ,
108
- div = $ ( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ) ,
108
+ div = $ ( "<div " +
109
+ "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
110
+ "<div style='height:100px;width:auto;'></div></div>" ) ,
109
111
innerDiv = div . children ( ) [ 0 ] ;
110
112
111
113
$ ( "body" ) . append ( div ) ;
@@ -242,8 +244,10 @@ $.fn.position = function( options ) {
242
244
elemHeight = elem . outerHeight ( ) ,
243
245
marginLeft = parseCss ( this , "marginLeft" ) ,
244
246
marginTop = parseCss ( this , "marginTop" ) ,
245
- collisionWidth = elemWidth + marginLeft + parseCss ( this , "marginRight" ) + scrollInfo . width ,
246
- collisionHeight = elemHeight + marginTop + parseCss ( this , "marginBottom" ) + scrollInfo . height ,
247
+ collisionWidth = elemWidth + marginLeft + parseCss ( this , "marginRight" ) +
248
+ scrollInfo . width ,
249
+ collisionHeight = elemHeight + marginTop + parseCss ( this , "marginBottom" ) +
250
+ scrollInfo . height ,
247
251
position = $ . extend ( { } , basePosition ) ,
248
252
myOffset = getOffsets ( offsets . my , elem . outerWidth ( ) , elem . outerHeight ( ) ) ;
249
253
@@ -353,7 +357,8 @@ $.ui.position = {
353
357
354
358
// Element is initially over the left side of within
355
359
if ( overLeft > 0 && overRight <= 0 ) {
356
- newOverRight = position . left + overLeft + data . collisionWidth - outerWidth - withinOffset ;
360
+ newOverRight = position . left + overLeft + data . collisionWidth - outerWidth -
361
+ withinOffset ;
357
362
position . left += overLeft - newOverRight ;
358
363
359
364
// Element is initially over right side of within
@@ -396,7 +401,8 @@ $.ui.position = {
396
401
397
402
// Element is initially over the top of within
398
403
if ( overTop > 0 && overBottom <= 0 ) {
399
- newOverBottom = position . top + overTop + data . collisionHeight - outerHeight - withinOffset ;
404
+ newOverBottom = position . top + overTop + data . collisionHeight - outerHeight -
405
+ withinOffset ;
400
406
position . top += overTop - newOverBottom ;
401
407
402
408
// Element is initially over bottom of within
@@ -450,12 +456,14 @@ $.ui.position = {
450
456
newOverLeft ;
451
457
452
458
if ( overLeft < 0 ) {
453
- newOverRight = position . left + myOffset + atOffset + offset + data . collisionWidth - outerWidth - withinOffset ;
459
+ newOverRight = position . left + myOffset + atOffset + offset + data . collisionWidth -
460
+ outerWidth - withinOffset ;
454
461
if ( newOverRight < 0 || newOverRight < abs ( overLeft ) ) {
455
462
position . left += myOffset + atOffset + offset ;
456
463
}
457
464
} else if ( overRight > 0 ) {
458
- newOverLeft = position . left - data . collisionPosition . marginLeft + myOffset + atOffset + offset - offsetLeft ;
465
+ newOverLeft = position . left - data . collisionPosition . marginLeft + myOffset +
466
+ atOffset + offset - offsetLeft ;
459
467
if ( newOverLeft > 0 || abs ( newOverLeft ) < overRight ) {
460
468
position . left += myOffset + atOffset + offset ;
461
469
}
@@ -484,12 +492,14 @@ $.ui.position = {
484
492
newOverTop ,
485
493
newOverBottom ;
486
494
if ( overTop < 0 ) {
487
- newOverBottom = position . top + myOffset + atOffset + offset + data . collisionHeight - outerHeight - withinOffset ;
495
+ newOverBottom = position . top + myOffset + atOffset + offset + data . collisionHeight -
496
+ outerHeight - withinOffset ;
488
497
if ( newOverBottom < 0 || newOverBottom < abs ( overTop ) ) {
489
498
position . top += myOffset + atOffset + offset ;
490
499
}
491
500
} else if ( overBottom > 0 ) {
492
- newOverTop = position . top - data . collisionPosition . marginTop + myOffset + atOffset + offset - offsetTop ;
501
+ newOverTop = position . top - data . collisionPosition . marginTop + myOffset + atOffset +
502
+ offset - offsetTop ;
493
503
if ( newOverTop > 0 || abs ( newOverTop ) < overBottom ) {
494
504
position . top += myOffset + atOffset + offset ;
495
505
}
0 commit comments