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
Hi, i don't know if it's an issue with the documentation or the implementation. But the documentation reads:
/** prevent direct resizing by the user (default?: undefined = un-constrained) */
noResize?: boolean;
/** prevents direct moving by the user (default?: undefined = un-constrained) */
noMove?: boolean;
/** same as noMove+noResize but also prevents being pushed by other widgets or api (default?: undefined = un-constrained) */
locked?: boolean;
So for locked I would assume that it does the same as noResize and noMove:
same as noMove+noResize but also ...
But if I create an item where locked is true, it can still be moved and resized via mouse. This is not the case if I create an item where noResize is true and noMove is true.
Steps to reproduce
Create an item where locked is true
Create an item noResize is true and noMove is true
locked - means another widget wouldn't be able to move it during dragging or resizing. The widget can still be dragged or resized by the user. You need to add noResize and noMove attributes to completely lock the widget.
With this option we keep all present widgets on their place while moving or resizing one widget. When upgrading to version 11.5.0 all widgets are now completely locked. Adding properties noMove=false and noResize=false does not work to create the functionality as stated in the documentation.
@DBolderman you are absolutely correct, I keep forgeting what locked means (I don't use it) as different from the other 2 flags... and jumped to a 'fix' in a rush late at night. will revert and publish a patch. thanks for catching that....
Then this documentation for locked should be changed accordingly: same as noMove+noResize but also prevents being pushed by other widgets or api (default?: undefined = un-constrained)
Activity
adumesny commentedon Mar 4, 2025
yeah, this is broken https://gridstackjs.com/demo/web2.html while demo 2 here works as expected
Locked not working as expected
adumesny commentedon Mar 16, 2025
fixed in next release
DBolderman commentedon Mar 18, 2025
This fix breaks functionality how we use this based on how it is mentioned in the documentation (https://github.com/gridstack/gridstack.js/tree/master/doc):
With this option we keep all present widgets on their place while moving or resizing one widget. When upgrading to version 11.5.0 all widgets are now completely locked. Adding properties
noMove=falseandnoResize=falsedoes not work to create the functionality as stated in the documentation.adumesny commentedon Mar 18, 2025
@DBolderman you are absolutely correct, I keep forgeting what locked means (I don't use it) as different from the other 2 flags... and jumped to a 'fix' in a rush late at night. will revert and publish a patch. thanks for catching that....
E4RIJMP commentedon Mar 18, 2025
Then this documentation for
lockedshould be changed accordingly:same as noMove+noResize but also prevents being pushed by other widgets or api (default?: undefined = un-constrained)https://github.com/gridstack/gridstack.js/blob/a10cba698efb2903532d6028c88047e7b7278cf8/src/types.ts#L336C2-L336C127
revert this change lock change
adumesny commentedon Mar 24, 2025
fixed in just released v11.5.1 (and doc updated)