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

items incorrectly re-ordered during a drag with maxRow #1534

Closed
adumesny opened this issue Dec 13, 2020 · 3 comments
Closed

items incorrectly re-ordered during a drag with maxRow #1534

adumesny opened this issue Dec 13, 2020 · 3 comments
Labels

Comments

@adumesny
Copy link
Member

adumesny commented Dec 13, 2020

the items (float: false) are incorrectly re-ordered when dragging one out

Your environment

  • version 3.1.2 h5, chrome

broke in 2.0.2 https://github.com/gridstack/gridstack.js/releases/tag/v2.0.2

Steps to reproduce

using upcoming collision test case. drag item 3 out, noticed both columns changes and incorrectly re-orders items...
happens with maxRow:3 only

    let grid = GridStack.init({float: false, cellHeight: 70, row: 3});
    addEvents(grid);

    let count = 0;
    let items = [
      {x:0, y:0}, {x:0, y:1}, {x:0, y:2}, {x:1, y:0}, {x:1, y:1}, {x:1, y:2}
    ];
    items.forEach(n => n.content = String(count++))
    grid.load(items);

20201213_105659

@adumesny adumesny changed the title items incorrectly re-ordered during a drag items incorrectly re-ordered during a drag with maxRow Dec 13, 2020
@adumesny
Copy link
Member Author

adumesny commented Dec 13, 2020

broken in 2.0.2 caused when fixing #937 in CL #1395
but originally broken (5 going above 4) by fixing #1155

what a mess...

@adumesny
Copy link
Member Author

fixed in collision re-write #1621

@adumesny
Copy link
Member Author

see #1094 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant