@@ -246,28 +246,40 @@ QUnit.test( "nested resizable", function( assert ) {
246
246
247
247
QUnit . test ( "Resizable with scrollbars and box-sizing: border-box" , function ( assert ) {
248
248
assert . expect ( 4 ) ;
249
- testResizableWithBoxSizing ( assert , true , false ) ;
249
+ testResizableWithBoxSizing ( assert , {
250
+ isBorderBox : true ,
251
+ applyScaleTransform : false
252
+ } ) ;
250
253
} ) ;
251
254
252
255
QUnit . test ( "Resizable with scrollbars and box-sizing: content-box" , function ( assert ) {
253
256
assert . expect ( 4 ) ;
254
- testResizableWithBoxSizing ( assert , false , false ) ;
257
+ testResizableWithBoxSizing ( assert , {
258
+ isBorderBox : false ,
259
+ applyScaleTransform : false
260
+ } ) ;
255
261
} ) ;
256
262
257
263
QUnit . test ( "Resizable with scrollbars, a transform and box-sizing: border-box" , function ( assert ) {
258
264
assert . expect ( 4 ) ;
259
- testResizableWithBoxSizing ( assert , true , true ) ;
265
+ testResizableWithBoxSizing ( assert , {
266
+ isBorderBox : true ,
267
+ applyScaleTransform : true
268
+ } ) ;
260
269
} ) ;
261
270
262
271
QUnit . test ( "Resizable with scrollbars, a transform and box-sizing: content-box" , function ( assert ) {
263
272
assert . expect ( 4 ) ;
264
- testResizableWithBoxSizing ( assert , false , true ) ;
273
+ testResizableWithBoxSizing ( assert , {
274
+ isBorderBox : false ,
275
+ applyScaleTransform : true
276
+ } ) ;
265
277
} ) ;
266
278
267
- function testResizableWithBoxSizing ( assert , isBorderBox , applyScaleTransform ) {
279
+ function testResizableWithBoxSizing ( assert , options ) {
268
280
var widthBefore , heightBefore ,
269
- cssBoxSizing = isBorderBox ? "border-box" : "content-box" ,
270
- cssTrasform = applyScaleTransform ? "scale(1.5)" : "" ,
281
+ cssBoxSizing = options . isBorderBox ? "border-box" : "content-box" ,
282
+ cssTransform = options . applyScaleTransform ? "scale(1.5)" : "" ,
271
283
elementContent = $ ( "<div>" )
272
284
. css ( {
273
285
width : "200px" ,
@@ -278,7 +290,7 @@ function testResizableWithBoxSizing( assert, isBorderBox, applyScaleTransform )
278
290
margin : "20px"
279
291
} )
280
292
. appendTo ( "#resizable1" ) ,
281
- element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : cssTrasform } ) . resizable ( ) ,
293
+ element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : cssTransform } ) . resizable ( ) ,
282
294
handle = ".ui-resizable-se" ;
283
295
284
296
$ ( "<style> * { box-sizing: " + cssBoxSizing + "; } </style>" ) . appendTo ( "#qunit-fixture" ) ;
0 commit comments