@@ -317,7 +317,9 @@ $.widget("ui.draggable", $.ui.mouse, {
317
317
_cacheMargins : function ( ) {
318
318
this . margins = {
319
319
left : ( parseInt ( this . element . css ( "marginLeft" ) , 10 ) || 0 ) ,
320
- top : ( parseInt ( this . element . css ( "marginTop" ) , 10 ) || 0 )
320
+ top : ( parseInt ( this . element . css ( "marginTop" ) , 10 ) || 0 ) ,
321
+ right : ( parseInt ( this . element . css ( "marginRight" ) , 10 ) || 0 ) ,
322
+ bottom : ( parseInt ( this . element . css ( "marginBottom" ) , 10 ) || 0 )
321
323
} ;
322
324
} ,
323
325
@@ -345,10 +347,10 @@ $.widget("ui.draggable", $.ui.mouse, {
345
347
var over = ( $ ( ce ) . css ( "overflow" ) != 'hidden' ) ;
346
348
347
349
this . containment = [
348
- co . left + ( parseInt ( $ ( ce ) . css ( "borderLeftWidth" ) , 10 ) || 0 ) + ( parseInt ( $ ( ce ) . css ( "paddingLeft" ) , 10 ) || 0 ) - this . margins . left ,
349
- co . top + ( parseInt ( $ ( ce ) . css ( "borderTopWidth" ) , 10 ) || 0 ) + ( parseInt ( $ ( ce ) . css ( "paddingTop" ) , 10 ) || 0 ) - this . margins . top ,
350
- co . left + ( over ? Math . max ( ce . scrollWidth , ce . offsetWidth ) : ce . offsetWidth ) - ( parseInt ( $ ( ce ) . css ( "borderLeftWidth" ) , 10 ) || 0 ) - ( parseInt ( $ ( ce ) . css ( "paddingRight" ) , 10 ) || 0 ) - this . helperProportions . width - this . margins . left ,
351
- co . top + ( over ? Math . max ( ce . scrollHeight , ce . offsetHeight ) : ce . offsetHeight ) - ( parseInt ( $ ( ce ) . css ( "borderTopWidth" ) , 10 ) || 0 ) - ( parseInt ( $ ( ce ) . css ( "paddingBottom" ) , 10 ) || 0 ) - this . helperProportions . height - this . margins . top
350
+ co . left + ( parseInt ( $ ( ce ) . css ( "borderLeftWidth" ) , 10 ) || 0 ) + ( parseInt ( $ ( ce ) . css ( "paddingLeft" ) , 10 ) || 0 ) ,
351
+ co . top + ( parseInt ( $ ( ce ) . css ( "borderTopWidth" ) , 10 ) || 0 ) + ( parseInt ( $ ( ce ) . css ( "paddingTop" ) , 10 ) || 0 ) ,
352
+ co . left + ( over ? Math . max ( ce . scrollWidth , ce . offsetWidth ) : ce . offsetWidth ) - ( parseInt ( $ ( ce ) . css ( "borderLeftWidth" ) , 10 ) || 0 ) - ( parseInt ( $ ( ce ) . css ( "paddingRight" ) , 10 ) || 0 ) - this . helperProportions . width - this . margins . left - this . margins . right ,
353
+ co . top + ( over ? Math . max ( ce . scrollHeight , ce . offsetHeight ) : ce . offsetHeight ) - ( parseInt ( $ ( ce ) . css ( "borderTopWidth" ) , 10 ) || 0 ) - ( parseInt ( $ ( ce ) . css ( "paddingBottom" ) , 10 ) || 0 ) - this . helperProportions . height - this . margins . top - this . margins . bottom
352
354
] ;
353
355
} else if ( o . containment . constructor == Array ) {
354
356
this . containment = o . containment ;
0 commit comments