You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
more for fix#1235
* moved the old individual routines to be hidden as update() does everything now
* updated doc which I forgot on last check in
* removed some old 0.5/0.6 backward compatible checks
Copy file name to clipboardExpand all lines: doc/CHANGES.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Change log
48
48
- fix [1484](https://github.com/gridstack/gridstack.js/issues/1484) dragging between 2 grids and back (regression in 2.0.1)
49
49
- fix [1471](https://github.com/gridstack/gridstack.js/issues/1471)`load()` into 1 column mode doesn't resize back to 12 correctly
50
50
- fix [1235](https://github.com/gridstack/gridstack.js/issues/1235)`update(el, opts)` re-write to take all `GridStackWidget` options (not just x,y,width,height) and do everything efficiently.
51
-
Fixed`locked()`, `move()`, `resize()`, `minWidth()`,etc... to call update() instead which does all the constrain, not just update attributes!
51
+
Hiding`locked()`, `move()`, `resize()`, `minWidth()`,etc... as they just simply call update() which does all the constrain now as well!
52
52
- del `ddPlugin` grid option as we only have one drag&drop plugin at runtime, which is defined by the include you use (HTML5 vs jquery vs none)
@@ -398,13 +391,6 @@ Checks if specified area is empty.
398
391
-`addAndRemove` boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving the user control of insertion.
399
392
- see [example](http://gridstackjs.com/demo/serialization.html)
400
393
401
-
### locked(el, val)
402
-
403
-
Locks/unlocks widget.
404
-
405
-
-`el` - widget or selector to modify.
406
-
-`val` - if `true` widget will be locked.
407
-
408
394
### makeWidget(el)
409
395
410
396
If you add elements to your gridstack container by hand, you have to tell gridstack afterwards to make them widgets. If you want gridstack to add the elements for you, use `addWidget` instead.
@@ -428,50 +414,13 @@ gap between grid item and content (default?: 10). This will set all 4 sides and
428
414
- string with space separated values (ex: `'5px 10px 0 20px'` for all 4 sides, or `'5em 10em'` for top/bottom and left/right pairs like CSS).
429
415
- Note: all sides must have same units (last one wins, default px)
430
416
431
-
### maxHeight(el, val)
432
-
433
-
Set the `maxHeight` for a widget.
434
-
435
-
-`el` - widget to modify.
436
-
-`val` - A numeric value of the number of rows
437
-
438
-
### minHeight(el, val)
439
-
440
-
Set the `minHeight` for a widget.
441
-
442
-
-`el` - widget to modify.
443
-
-`val` - A numeric value of the number of rows
444
-
445
-
### maxWidth(el, val)
446
-
447
-
Set the `maxWidth` for a widget.
448
-
449
-
-`el` - widget to modify.
450
-
-`val` - A numeric value of the number of columns
451
-
452
-
### minWidth(el, val)
453
-
454
-
Set the `minWidth` for a widget.
455
-
456
-
-`el` - widget to modify.
457
-
-`val` - A numeric value of the number of columns
458
-
459
417
### movable(el, val)
460
418
461
419
Enables/Disables moving.
462
420
463
421
-`el` - widget to modify
464
422
-`val` - if `true` widget will be draggable.
465
423
466
-
### move(el, x, y)
467
-
468
-
Changes widget position
469
-
470
-
Parameters:
471
-
472
-
-`el` - widget to move
473
-
-`x`, `y` - new position. If value is `null` or `undefined` it will be ignored.
it('warning if OLD setGridWidth is called', function() {
1772
1773
let grid: any = GridStack.init();
1773
1774
grid.setGridWidth(11); // old 0.5.2 API
1774
1775
expect(grid.getColumn()).toBe(11);
1775
1776
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `setGridWidth` is deprecated in v0.5.3 and has been replaced with `column`. It will be **completely** removed in v1.0');
1776
1777
});
1777
-
it('warning if OLD setColumn is called',function(){
1778
-
letgrid: any=GridStack.init();
1779
-
grid.setColumn(10);// old 0.6.4 API
1780
-
expect(grid.getColumn()).toBe(10);
1781
-
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `setColumn` is deprecated in v0.6.4 and has been replaced with `column`. It will be **completely** removed in v1.0');
1782
-
});
1783
-
it('warning if OLD grid height is set',function(){
1784
-
letgrid=(GridStackasany).init({height: 10});// old 0.5.2 Opt now maxRow
1785
-
expect(grid.opts.maxRow).toBe(10);
1786
-
expect(grid.engine.maxRow).toBe(10);
1787
-
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Option `height` is deprecated in v0.5.3 and has been replaced with `maxRow`. It will be **completely** removed in v1.0');
1788
-
});
1789
-
it('warning if OLD oneColumnModeClass is set (no changes)',function(){
0 commit comments