Skip to content

fix #1785 switching column overlap#1894

Merged
adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master
Dec 21, 2021
Merged

fix #1785 switching column overlap#1894
adumesny merged 1 commit into
gridstack:masterfrom
adumesny:master

Conversation

@adumesny

@adumesny adumesny commented Dec 21, 2021

Copy link
Copy Markdown
Member

Description

  • guard against 0 column
  • making changes in a layout, propagates the differences to larger layout (deleting smaller ones)
    causing potential negative (x,y) cached values.
    We always used nodeBoundFix() to prevent that when adding the nodes back, but due to saving _orig value after (instead of early) and combination of _dirty, we didn't always updating collision in the DOM
  • also changed updateNodeWidths() to always scale things down live (regardless of cached layout to make it smoother) but use the largest 12 column layout to scale things up if not already cached.
  • more efficient in updating _dirty only nodes attributes from last values.
  • added test file showing issue.

fix #1785

Checklist

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

* guard against 0 column
* making changes in a layout, propagates the differences to larger layout (deleting smaller ones)
causing potential negative (x,y) cached values.
We always used nodeBoundFix() to prevent that when adding the nodes back, but due to saving _orig value after (instead of early) and combination of _dirty, we didn't always updating collision in the DOM
* also changed updateNodeWidths() to always scale things down live (regardless of cached layout to make it smoother) but use the largest 12 column layout to scale things up if not already cached.
* more efficient in updating _dirty only nodes attributes from last values.
* added test file showing issue.
@adumesny adumesny merged commit 2e18461 into gridstack:master Dec 21, 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.

Disappearing/overlapping items when resizing columns too quickly combined with compact

1 participant