@@ -321,21 +321,21 @@ describe('gridstack', function() {
321
321
expect ( grid . getColumn ( ) ) . toBe ( 1 ) ;
322
322
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
323
323
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
324
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
324
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
325
325
expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
326
326
327
327
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
328
328
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 2 ) ;
329
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
329
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
330
330
expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 4 ) ;
331
331
332
332
// add default 1x1 item to the end (1 column)
333
333
let el3 = grid . addWidget ( ) ;
334
334
expect ( el3 ) . not . toBe ( null ) ;
335
335
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
336
336
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 6 ) ;
337
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
338
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
337
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
338
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
339
339
340
340
// back to 12 column and initial layout (other than new item3)
341
341
grid . column ( 12 ) ;
@@ -353,51 +353,51 @@ describe('gridstack', function() {
353
353
// remembers autoPlacement so finds next slot on 12 layout after 4x2 + 4x4
354
354
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 8 ) ;
355
355
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
356
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
357
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
356
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
357
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
358
358
359
359
// back to 1 column
360
360
grid . column ( 1 ) ;
361
361
expect ( grid . getColumn ( ) ) . toBe ( 1 ) ;
362
362
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
363
363
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
364
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
364
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
365
365
expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
366
366
367
367
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
368
368
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 2 ) ;
369
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
369
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
370
370
expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 4 ) ;
371
371
372
372
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
373
373
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 6 ) ;
374
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
375
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
374
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
375
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
376
376
377
377
// move item2 to beginning to [3][1][2] vertically
378
378
grid . update ( el3 , { x :0 , y :0 } ) ;
379
379
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
380
380
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
381
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
382
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
381
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
382
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
383
383
384
384
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
385
385
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
386
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
386
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
387
387
expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
388
388
389
389
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
390
390
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 3 ) ;
391
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
391
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
392
392
expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 4 ) ;
393
393
394
394
// back to 12 column, el3 to be beginning still, but [1][2] to be in 1 columns still but wide 4x2 and 4x still
395
395
grid . column ( 12 ) ;
396
396
expect ( grid . getColumn ( ) ) . toBe ( 12 ) ;
397
397
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ; // 8 TEST WHY
398
398
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
399
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
400
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
399
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
400
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
401
401
402
402
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
403
403
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
@@ -416,17 +416,17 @@ describe('gridstack', function() {
416
416
417
417
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ; // 1 TEST WHY
418
418
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
419
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ; // 1 as we scaled from 12 columns
420
- expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
419
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ; // 1 as we scaled from 12 columns
420
+ expect ( el3 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
421
421
422
422
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
423
423
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
424
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
424
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
425
425
expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
426
426
427
427
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 1 ) ;
428
428
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
429
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
429
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
430
430
expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 4 ) ;
431
431
} ) ;
432
432
} ) ;
@@ -455,35 +455,35 @@ describe('gridstack', function() {
455
455
// items are item1[1x1], item3[1x1], item2[2x1]
456
456
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
457
457
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
458
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
459
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
458
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
459
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
460
460
461
461
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 1 ) ;
462
462
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
463
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
463
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
464
464
expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
465
465
466
466
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 2 ) ;
467
467
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
468
468
expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 2 ) ;
469
- expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
469
+ expect ( el2 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
470
470
471
471
// items are item1[1x1], item3[1x2], item2[1x1] in 1 column
472
472
grid . column ( 1 ) ;
473
473
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
474
474
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
475
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
476
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
475
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
476
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
477
477
478
478
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
479
479
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
480
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
480
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
481
481
expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
482
482
483
483
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
484
484
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 3 ) ;
485
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
486
- expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
485
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
486
+ expect ( el2 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
487
487
} ) ;
488
488
it ( 'should support oneColumnModeDomSort ON going to 1 column' , function ( ) {
489
489
let options = {
@@ -499,34 +499,34 @@ describe('gridstack', function() {
499
499
// items are item1[1x1], item3[1x1], item2[2x1]
500
500
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
501
501
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
502
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
503
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
502
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
503
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
504
504
505
505
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 1 ) ;
506
506
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
507
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
507
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
508
508
expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
509
509
510
510
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 2 ) ;
511
511
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
512
512
expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 2 ) ;
513
- expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
513
+ expect ( el2 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
514
514
515
515
// items are item1[1x1], item2[1x1], item3[1x2] in 1 column dom ordered
516
516
grid . column ( 1 ) ;
517
517
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
518
518
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
519
- expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
520
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
519
+ expect ( el1 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
520
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
521
521
522
522
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
523
523
expect ( parseInt ( el2 . getAttribute ( 'gs-y' ) ) ) . toBe ( 1 ) ;
524
- expect ( parseInt ( el2 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
525
- expect ( parseInt ( el2 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
524
+ expect ( el2 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
525
+ expect ( el2 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
526
526
527
527
expect ( parseInt ( el3 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
528
528
expect ( parseInt ( el3 . getAttribute ( 'gs-y' ) ) ) . toBe ( 2 ) ;
529
- expect ( parseInt ( el3 . getAttribute ( 'gs-w' ) ) ) . toBe ( 1 ) ;
529
+ expect ( el3 . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
530
530
expect ( parseInt ( el3 . getAttribute ( 'gs-h' ) ) ) . toBe ( 2 ) ;
531
531
} ) ;
532
532
} ) ;
@@ -863,7 +863,7 @@ describe('gridstack', function() {
863
863
864
864
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
865
865
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
866
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
866
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
867
867
expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 2 ) ;
868
868
// expect(widget.getAttribute('gs-auto-position')).toBe('true');
869
869
expect ( widget . getAttribute ( 'gs-id' ) ) . toBe ( 'optionWidget' ) ;
@@ -874,7 +874,7 @@ describe('gridstack', function() {
874
874
875
875
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
876
876
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
877
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
877
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
878
878
expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 2 ) ;
879
879
// expect(widget.getAttribute('gs-auto-position')).toBe('true');
880
880
expect ( widget . getAttribute ( 'gs-id' ) ) . toBe ( 'optionWidget' ) ;
@@ -885,7 +885,7 @@ describe('gridstack', function() {
885
885
886
886
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
887
887
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
888
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
888
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
889
889
expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 2 ) ;
890
890
// expect(widget.getAttribute('gs-auto-position')).toBe('true');
891
891
expect ( widget . getAttribute ( 'gs-id' ) ) . toBe ( 'optionWidget' ) ;
@@ -896,7 +896,7 @@ describe('gridstack', function() {
896
896
897
897
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
898
898
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
899
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
899
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
900
900
expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 2 ) ;
901
901
// expect(widget.getAttribute('gs-auto-position')).toBe('true');
902
902
expect ( widget . getAttribute ( 'gs-id' ) ) . toBe ( 'optionWidget' ) ;
@@ -907,8 +907,8 @@ describe('gridstack', function() {
907
907
908
908
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
909
909
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
910
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
911
- expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 1 ) ;
910
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
911
+ expect ( widget . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
912
912
// expect(widget.getAttribute('gs-auto-position')).toBe('true');
913
913
} ) ;
914
914
@@ -927,8 +927,8 @@ describe('gridstack', function() {
927
927
928
928
expect ( parseInt ( widget . getAttribute ( 'gs-x' ) , 10 ) ) . toBe ( 8 ) ;
929
929
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 0 ) ;
930
- expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 1 ) ;
931
- expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 1 ) ;
930
+ expect ( widget . getAttribute ( 'gs-w' ) ) . toBe ( null ) ;
931
+ expect ( widget . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
932
932
} ) ;
933
933
it ( 'null options should clear x position' , function ( ) {
934
934
let grid = GridStack . init ( { float : true } ) ;
@@ -946,7 +946,7 @@ describe('gridstack', function() {
946
946
expect ( parseInt ( widget . getAttribute ( 'gs-y' ) , 10 ) ) . toBe ( 5 ) ;
947
947
expect ( parseInt ( widget . getAttribute ( 'gs-w' ) , 10 ) ) . toBe ( 3 ) ;
948
948
expect ( widget . gridstackNode . maxW ) . toBe ( 4 ) ;
949
- expect ( parseInt ( widget . getAttribute ( 'gs-h' ) , 10 ) ) . toBe ( 1 ) ;
949
+ expect ( widget . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
950
950
expect ( widget . getAttribute ( 'gs-id' ) ) . toBe ( 'foo' ) ;
951
951
} ) ;
952
952
} ) ;
@@ -1800,7 +1800,7 @@ describe('gridstack', function() {
1800
1800
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
1801
1801
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
1802
1802
expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 5 ) ;
1803
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
1803
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
1804
1804
1805
1805
let el2 = document . getElementById ( 'item2' )
1806
1806
expect ( parseInt ( el2 . getAttribute ( 'gs-x' ) ) ) . toBe ( 6 ) ;
@@ -1822,7 +1822,7 @@ describe('gridstack', function() {
1822
1822
expect ( parseInt ( el1 . getAttribute ( 'gs-x' ) ) ) . toBe ( 0 ) ;
1823
1823
expect ( parseInt ( el1 . getAttribute ( 'gs-y' ) ) ) . toBe ( 0 ) ;
1824
1824
expect ( parseInt ( el1 . getAttribute ( 'gs-w' ) ) ) . toBe ( 5 ) ;
1825
- expect ( parseInt ( el1 . getAttribute ( 'gs-h' ) ) ) . toBe ( 1 ) ;
1825
+ expect ( el1 . getAttribute ( 'gs-h' ) ) . toBe ( null ) ;
1826
1826
1827
1827
expect ( document . getElementById ( 'item2' ) ) . toBe ( null ) ;
1828
1828
let el2 = grid . engine . nodes . find ( n => n . id === 'new2' ) . el ;
0 commit comments