@@ -249,7 +249,7 @@ QUnit.test( "Resizable with scrollbars and box-sizing: border-box", function( as
249
249
250
250
$ ( "<style> * { box-sizing: border-box; } </style>" ) . appendTo ( "#qunit-fixture" ) ;
251
251
252
- //Both scrollbars
252
+ // Both scrollbars
253
253
var elementContent = $ ( "<div>" )
254
254
. css ( {
255
255
width : "200px" ,
@@ -260,14 +260,14 @@ QUnit.test( "Resizable with scrollbars and box-sizing: border-box", function( as
260
260
margin : "20px"
261
261
} )
262
262
. appendTo ( "#resizable1" ) ,
263
- element = $ ( "#resizable1" ) . css ( "overflow" , "auto" ) . resizable ( ) ,
264
- handle = ".ui-resizable-se" ;
263
+ element = $ ( "#resizable1" ) . css ( "overflow" , "auto" ) . resizable ( ) ,
264
+ handle = ".ui-resizable-se" ;
265
265
266
266
testHelper . drag ( handle , 10 , 10 ) ;
267
267
assert . equal ( element . width ( ) , 110 , "element width (both scrollbars)" ) ;
268
268
assert . equal ( element . height ( ) , 110 , "element height (both scrollbars)" ) ;
269
269
270
- //Single (vertical) scrollbar.
270
+ // Single (vertical) scrollbar.
271
271
elementContent . css ( "width" , "50px" ) ;
272
272
testHelper . drag ( handle , 10 , 10 ) ;
273
273
assert . equal ( element . width ( ) , 120 , "element width (only vertical scrollbar)" ) ;
@@ -279,8 +279,9 @@ QUnit.test( "Resizable with scrollbars and box-sizing: content-box", function( a
279
279
280
280
$ ( "<style> * { box-sizing: content-box; } </style>" ) . appendTo ( "#qunit-fixture" ) ;
281
281
282
- //Both scrollbars
283
- var elementContent = $ ( "<div>" )
282
+ // Both scrollbars
283
+ var widthBefore , heightBefore ,
284
+ elementContent = $ ( "<div>" )
284
285
. css ( {
285
286
width : "200px" ,
286
287
height : "200px" ,
@@ -290,18 +291,18 @@ QUnit.test( "Resizable with scrollbars and box-sizing: content-box", function( a
290
291
margin : "20px"
291
292
} )
292
293
. appendTo ( "#resizable1" ) ,
293
- element = $ ( "#resizable1" ) . css ( "overflow" , "auto" ) . resizable ( ) ,
294
- handle = ".ui-resizable-se" ;
294
+ element = $ ( "#resizable1" ) . css ( "overflow" , "auto" ) . resizable ( ) ,
295
+ handle = ".ui-resizable-se" ;
295
296
296
297
// In some browsers scrollbar may change element size (when "box-sizing: content-box")
297
- var widthBefore = element . innerWidth ( ) ;
298
- var heightBefore = element . innerHeight ( ) ;
298
+ widthBefore = element . innerWidth ( ) ;
299
+ heightBefore = element . innerHeight ( ) ;
299
300
300
301
testHelper . drag ( handle , 10 , 10 ) ;
301
302
assert . equal ( parseFloat ( element . innerWidth ( ) ) , widthBefore + 10 , "element width (both scrollbars)" ) ;
302
303
assert . equal ( parseFloat ( element . innerHeight ( ) ) , heightBefore + 10 , "element height (both scrollbars)" ) ;
303
304
304
- //Single (vertical) scrollbar.
305
+ // Single (vertical) scrollbar.
305
306
elementContent . css ( "width" , "50px" ) ;
306
307
307
308
testHelper . drag ( handle , 10 , 10 ) ;
@@ -314,7 +315,7 @@ QUnit.test( "Resizable with scrollbars, a transform and box-sizing: border-box",
314
315
315
316
$ ( "<style> * { box-sizing: border-box; } </style>" ) . appendTo ( "#qunit-fixture" ) ;
316
317
317
- //Both scrollbars
318
+ // Both scrollbars
318
319
var elementContent = $ ( "<div>" )
319
320
. css ( {
320
321
width : "200px" ,
@@ -325,14 +326,14 @@ QUnit.test( "Resizable with scrollbars, a transform and box-sizing: border-box",
325
326
margin : "20px"
326
327
} )
327
328
. appendTo ( "#resizable1" ) ,
328
- element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : "scale(1.5)" } ) . resizable ( ) ,
329
- handle = ".ui-resizable-se" ;
329
+ element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : "scale(1.5)" } ) . resizable ( ) ,
330
+ handle = ".ui-resizable-se" ;
330
331
331
332
testHelper . drag ( handle , 10 , 10 ) ;
332
333
assert . equal ( element . width ( ) , 110 , "element width (both scrollbars)" ) ;
333
334
assert . equal ( element . height ( ) , 110 , "element height (both scrollbars)" ) ;
334
335
335
- //Single (vertical) scrollbar.
336
+ // Single (vertical) scrollbar.
336
337
elementContent . css ( "width" , "50px" ) ;
337
338
testHelper . drag ( handle , 10 , 10 ) ;
338
339
assert . equal ( element . width ( ) , 120 , "element width (only vertical scrollbar)" ) ;
@@ -344,29 +345,30 @@ QUnit.test( "Resizable with scrollbars, a transform and box-sizing: content-box"
344
345
345
346
$ ( "<style> * { box-sizing: content-box; } </style>" ) . appendTo ( "#qunit-fixture" ) ;
346
347
347
- //Both scrollbars
348
- var elementContent = $ ( "<div>" )
349
- . css ( {
350
- width : "200px" ,
351
- height : "200px" ,
352
- padding : "10px" ,
353
- border : "5px" ,
354
- borderStyle : "solid" ,
355
- margin : "20px"
356
- } )
357
- . appendTo ( "#resizable1" ) ,
358
- element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : "scale(1.5)" } ) . resizable ( ) ,
359
- handle = ".ui-resizable-se" ;
348
+ // Both scrollbars
349
+ var widthBefore , heightBefore ,
350
+ elementContent = $ ( "<div>" )
351
+ . css ( {
352
+ width : "200px" ,
353
+ height : "200px" ,
354
+ padding : "10px" ,
355
+ border : "5px" ,
356
+ borderStyle : "solid" ,
357
+ margin : "20px"
358
+ } )
359
+ . appendTo ( "#resizable1" ) ,
360
+ element = $ ( "#resizable1" ) . css ( { overflow : "auto" , transform : "scale(1.5)" } ) . resizable ( ) ,
361
+ handle = ".ui-resizable-se" ;
360
362
361
363
// In some browsers scrollbar may change element size (when "box-sizing: content-box")
362
- var widthBefore = element . innerWidth ( ) ;
363
- var heightBefore = element . innerHeight ( ) ;
364
+ widthBefore = element . innerWidth ( ) ;
365
+ heightBefore = element . innerHeight ( ) ;
364
366
365
367
testHelper . drag ( handle , 10 , 10 ) ;
366
368
assert . equal ( parseFloat ( element . innerWidth ( ) ) , widthBefore + 10 , "element width (both scrollbars)" ) ;
367
369
assert . equal ( parseFloat ( element . innerHeight ( ) ) , heightBefore + 10 , "element height (both scrollbars)" ) ;
368
370
369
- //Single (vertical) scrollbar.
371
+ // Single (vertical) scrollbar.
370
372
elementContent . css ( "width" , "50px" ) ;
371
373
372
374
testHelper . drag ( handle , 10 , 10 ) ;
0 commit comments