but it has one caveat. After toggling the grid needs to update in order to change to fixed elements, which I don't know how to trigger within the code. So it waits until some user action to take effect.
Is there any other way to freeze the grid and unfreeze it if necessary?
I don't see a way to freeze and unfreeze the grid, meaning that all items should become fixed, not draggable or scalable.
I wrote a rather dirty workaround:
but it has one caveat. After toggling the grid needs to update in order to change to fixed elements, which I don't know how to trigger within the code. So it waits until some user action to take effect.
Is there any other way to freeze the grid and unfreeze it if necessary?