Update dist. (+14 squashed commits)
Squashed commits: [50607a9] build dist [ff0c00b] Allow negative numbers to be passed to parseHeight function test case fix [3ecc1ca] Allow negative numbers to be passed to parseHeight function test case [d20f670] Allow negative numbers to be passed to parseHeight function fix [0816163] Allow negative numbers to be passed to parseHeight function [aa18c63] rebuild dist [601b5d5] setGridWidth api documentation udpdate [c309856] Add a parameter to setGridWidth method to allow not to propagate resizing to widgets. [ea442d1] drag between grids [50ce614] jqueryui + requirejs note [3d8a8e1] drag between grids demo [446dade] drag from sidebar/between grids [e31d50e] check if element setup before detach [67274f8] trash zone is accepting only widgets
This commit is contained in:
parent
0b944927ab
commit
0273bb66d8
8 changed files with 385 additions and 76 deletions
|
|
@ -91,7 +91,19 @@ describe('gridstack utils', function() {
|
|||
expect(utils.parseHeight('12.3vw')).toEqual(jasmine.objectContaining({height: 12.3, unit: 'vw'}));
|
||||
expect(utils.parseHeight('12.5')).toEqual(jasmine.objectContaining({height: 12.5, unit: 'px'}));
|
||||
expect(function() { utils.parseHeight('12.5 df'); }).toThrowError('Invalid height');
|
||||
|
||||
});
|
||||
|
||||
it('should parse negative height value', function() {
|
||||
expect(utils.parseHeight(-12)).toEqual(jasmine.objectContaining({height: -12, unit: 'px'}));
|
||||
expect(utils.parseHeight('-12px')).toEqual(jasmine.objectContaining({height: -12, unit: 'px'}));
|
||||
expect(utils.parseHeight('-12.3px')).toEqual(jasmine.objectContaining({height: -12.3, unit: 'px'}));
|
||||
expect(utils.parseHeight('-12.3em')).toEqual(jasmine.objectContaining({height: -12.3, unit: 'em'}));
|
||||
expect(utils.parseHeight('-12.3rem')).toEqual(jasmine.objectContaining({height: -12.3, unit: 'rem'}));
|
||||
expect(utils.parseHeight('-12.3vh')).toEqual(jasmine.objectContaining({height: -12.3, unit: 'vh'}));
|
||||
expect(utils.parseHeight('-12.3vw')).toEqual(jasmine.objectContaining({height: -12.3, unit: 'vw'}));
|
||||
expect(utils.parseHeight('-12.5')).toEqual(jasmine.objectContaining({height: -12.5, unit: 'px'}));
|
||||
expect(function() { utils.parseHeight('-12.5 df'); }).toThrowError('Invalid height');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue