Skip to content

Feature: PreventCollision move rows #66

@AntoninoBonanno

Description

@AntoninoBonanno

Hi, I'm using this setup

  • compactType = "horizontal"
  • preventCollision = "true"

Cattura

I would like that by moving element 8 above element 11, it positions itself between element 5 and element 11 moving the whole row down (both element 11 and element 7 move down)

Cattura2

I would like to have this functionality without giving up the other functionality given by the attributes compactType = "horizontal" and preventCollision = "true". Or in any case I would need the lines to be locked: if I move an element up it must be possible to insert it only if there is space in that line otherwise it creates a new line. Same reasoning below if I move the element up the elements of the rows down shouldn't move. (Items in a row must be locked to that row and not move to other rows)

I thought of implementing this by catching the "dragStarted", "dragEnded" events and updating the layout manually, but the y of the element doesn't change when you drop it on another element (with preventCollision="true") and there is no event that is triggered on each change of x/y (dragging)

Surely there is a better way to implement this within the library

Thank you

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