Skip to content

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

@adumesny

Description

@adumesny

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions