Skip to content

Drag a item from one grid to another #61

@touchrank-dev

Description

@touchrank-dev

By studying the 'drag, drop from outside' example, I tried to implement this feature but failed. At first, the GridItem's move event doesn't expose the clientX and clientY of MouseEvent, so I cannot check whether the item is moved out or not. Second is, GridItem's move and moved events sometimes are not emitted, so I cannot call grid's dragEvent() accordingly. After that, removing a record from layout array during dragging will throw exception ( in hadleDray function of GridItem) because the HtmlElement is removed synchronously.
About the behavior of dragging and dropping an item between grids even crossing some grids, I think I should remove the placeholder from source grid when the item dragged is moved out, and append and move a placeholder in the dragging over grid ( and also remove it when mouse out), when the mouse is released in target grid, insert the item. If the mouse is released out of any grids, the source grid will be restored and the removed item will show in its original position.

Perhaps this feature is not a high priority, but I need this and am eager to find how to implement it. Hope I can hear from you. Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions