@@ -68,11 +68,11 @@ $.widget( "ui.resizable", $.ui.mouse, {
68
68
} ,
69
69
70
70
_num : function ( value ) {
71
- return parseInt ( value , 10 ) || 0 ;
71
+ return parseFloat ( value ) || 0 ;
72
72
} ,
73
73
74
74
_isNumber : function ( value ) {
75
- return ! isNaN ( parseInt ( value , 10 ) ) ;
75
+ return ! isNaN ( parseFloat ( value ) ) ;
76
76
} ,
77
77
78
78
_hasScroll : function ( el , a ) {
@@ -440,9 +440,9 @@ $.widget( "ui.resizable", $.ui.mouse, {
440
440
width : ( that . helper . width ( ) - soffsetw ) ,
441
441
height : ( that . helper . height ( ) - soffseth )
442
442
} ;
443
- left = ( parseInt ( that . element . css ( "left" ) , 10 ) +
443
+ left = ( parseFloat ( that . element . css ( "left" ) ) +
444
444
( that . position . left - that . originalPosition . left ) ) || null ;
445
- top = ( parseInt ( that . element . css ( "top" ) , 10 ) +
445
+ top = ( parseFloat ( that . element . css ( "top" ) ) +
446
446
( that . position . top - that . originalPosition . top ) ) || null ;
447
447
448
448
if ( ! o . animate ) {
@@ -640,8 +640,8 @@ $.widget( "ui.resizable", $.ui.mouse, {
640
640
] ;
641
641
642
642
for ( ; i < 4 ; i ++ ) {
643
- widths [ i ] = ( parseInt ( borders [ i ] , 10 ) || 0 ) ;
644
- widths [ i ] += ( parseInt ( paddings [ i ] , 10 ) || 0 ) ;
643
+ widths [ i ] = ( parseFloat ( borders [ i ] ) || 0 ) ;
644
+ widths [ i ] += ( parseFloat ( paddings [ i ] ) || 0 ) ;
645
645
}
646
646
647
647
return {
@@ -776,9 +776,9 @@ $.ui.plugin.add( "resizable", "animate", {
776
776
soffseth = ista && that . _hasScroll ( pr [ 0 ] , "left" ) ? 0 : that . sizeDiff . height ,
777
777
soffsetw = ista ? 0 : that . sizeDiff . width ,
778
778
style = { width : ( that . size . width - soffsetw ) , height : ( that . size . height - soffseth ) } ,
779
- left = ( parseInt ( that . element . css ( "left" ) , 10 ) +
779
+ left = ( parseFloat ( that . element . css ( "left" ) ) +
780
780
( that . position . left - that . originalPosition . left ) ) || null ,
781
- top = ( parseInt ( that . element . css ( "top" ) , 10 ) +
781
+ top = ( parseFloat ( that . element . css ( "top" ) ) +
782
782
( that . position . top - that . originalPosition . top ) ) || null ;
783
783
784
784
that . element . animate (
@@ -788,10 +788,10 @@ $.ui.plugin.add( "resizable", "animate", {
788
788
step : function ( ) {
789
789
790
790
var data = {
791
- width : parseInt ( that . element . css ( "width" ) , 10 ) ,
792
- height : parseInt ( that . element . css ( "height" ) , 10 ) ,
793
- top : parseInt ( that . element . css ( "top" ) , 10 ) ,
794
- left : parseInt ( that . element . css ( "left" ) , 10 )
791
+ width : parseFloat ( that . element . css ( "width" ) ) ,
792
+ height : parseFloat ( that . element . css ( "height" ) ) ,
793
+ top : parseFloat ( that . element . css ( "top" ) ) ,
794
+ left : parseFloat ( that . element . css ( "left" ) )
795
795
} ;
796
796
797
797
if ( pr && pr . length ) {
@@ -999,8 +999,8 @@ $.ui.plugin.add( "resizable", "alsoResize", {
999
999
$ ( o . alsoResize ) . each ( function ( ) {
1000
1000
var el = $ ( this ) ;
1001
1001
el . data ( "ui-resizable-alsoresize" , {
1002
- width : parseInt ( el . width ( ) , 10 ) , height : parseInt ( el . height ( ) , 10 ) ,
1003
- left : parseInt ( el . css ( "left" ) , 10 ) , top : parseInt ( el . css ( "top" ) , 10 )
1002
+ width : parseFloat ( el . width ( ) ) , height : parseFloat ( el . height ( ) ) ,
1003
+ left : parseFloat ( el . css ( "left" ) ) , top : parseFloat ( el . css ( "top" ) )
1004
1004
} ) ;
1005
1005
} ) ;
1006
1006
} ,
0 commit comments