Skip to content

enableMove() fix#1680

Merged
adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master
Mar 22, 2021
Merged

enableMove() fix#1680
adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master

Conversation

@adumesny

@adumesny adumesny commented Mar 22, 2021

Copy link
Copy Markdown
Member

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