grid icon indicating copy to clipboard operation
grid copied to clipboard

Move item between grids

Open juggy opened this issue 9 years ago • 2 comments

I want to have 2 grids and allow drag and drop between the 2. It would need to show the "constraints" while dragging over the new grid as well as moving around the preexisting items.

How difficult would it be to add and where should I look to give it a try?

Thx

juggy avatar Sep 14 '15 18:09 juggy

@juggy it would be quite difficult to implement that. You would have to:

  • add support for emitting events from the grid,
  • add the jQuery UI droppable plugin to listen for onOver events,
  • check that the events come from another grid,
  • add support for programmatically adding and removing items from a grid,
  • communicate with that grid to remove the item from its list of items and add it to the new grid,
  • make sure the item remains dragging and maintains its current position despite the DOM element being moved,
  • make sure it works backwards as well e.g. you drag an item from grid1 to grid2 then back to grid1 etc.

It's quite a lot of work to do. PRs are appreciated :smile:

You can check out the sortable plugin from jQueryUI, maybe it suits your needs.

andrei-picus-hs avatar Sep 21 '15 09:09 andrei-picus-hs

:+1: for this feature... Could allow a grid or a list of elements in a "Add element to grid sidebar" to be dragged into the main grid...

gxapplications avatar Feb 01 '16 23:02 gxapplications