Skip to content
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

enableMove() fix #1680

Merged
merged 1 commit into from
Mar 22, 2021
Merged

enableMove() fix #1680

merged 1 commit into from
Mar 22, 2021

Conversation

adumesny
Copy link
Member

@adumesny adumesny commented Mar 22, 2021

Description

  • fix enableMove() removes snapping on existing items #1658
  • we now set the grid options BEFORE we update each item as that override
  • enableMove() and enableResize() no longer take a second optional param as we must set grid options for things to work
    (if you want to enable current items but not change the grid itself, there is already the movable('.grid-stack-item') method that doesn't change the grid (no need for 2 ways)
  • did some more cleanup and added test case.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

* fix gridstack#1658
* we now set the grid options BEFORE we update each item as that override
* enableMove() and enableResize() no longer take a second optional param as we must set grid options for things to work
(if you want to enable current items but not change the grid itself, there is already the `movable('.grid-stack-item')` method that doesn't change the grid (no need for 2 ways)
* did some more cleanup and added test case.
@adumesny adumesny merged commit 45bebf4 into gridstack:master Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enableMove() removes snapping on existing items
1 participant