-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locked widgets cannot be moved by the user #1767
Comments
first of all you should not set locked property directly (internal) but make the api call second, locked = noMove (user) + noSize (user) + can't be moved by collision constrain by another widget by design. that is the expected behavior. |
Thank you for the information. I will use the update function. However I am still confused on the expected behavior of a 'locked' widget. According to the API:
so shouldnt a locked widget be able to be moved/resized by the user? |
More generally, how would I acheieve the behaviour of preventing the widget from being moved by the move/resize of other widgets? |
I stand corrected. in v0.5 (the furthers I went back that I worked on) not sure what the use case is for... weird that items will not get pushed out but user can still manually do it. |
* fix gridstack#1767 * `locked` item can be user moved/resized just not pushed by other nodes (broke in 1.1.1) * had incorrectly assume locked = noMove + noSize (user driven) but it's for layout only, so now you have complete choice.
* fix gridstack#1767 * `locked` item can be user moved/resized just not pushed by other nodes (broke in 1.1.1) * had incorrectly assume locked = noMove + noSize (user driven) but it's for layout only, so now you have complete choice.
fixed in next release. if you find this lib useful, don't forget to donate! |
Subject of the issue
Locked widget cannot be moved by the user
Your environment
gridstack.js v4.2.3, HTML5
Chrome, Windows 10
Steps to reproduce
Widget is locked by using the 'locked' property on the gridstackNode:
widget.gridstackNode.locked = true;
Expected behavior
The widget shouldn't be able to be moved due to another widgets being dragged or resized.
The widget can still be dragged or resized by the user.
Actual behavior
The widget shouldn't be able to be moved due to another widgets being dragged or resized.
The widget cannot still be dragged or resized by the user.
The text was updated successfully, but these errors were encountered: