Skip to content

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

Closed

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

Activity

  1. changed the title [-]items incorrectly re-ordered during a drag[/-] [+]items incorrectly re-ordered during a drag with maxRow[/+] on Dec 13, 2020
  2. adumesny commented on Dec 13, 2020

    @adumesny
    MemberAuthor

    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...

  3. adumesny commented on Feb 28, 2021

    @adumesny
    MemberAuthor

    fixed in collision re-write #1621

  4. adumesny commented on Mar 13, 2021

    @adumesny
    MemberAuthor

    see #1094 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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