ng2-dragula icon indicating copy to clipboard operation
ng2-dragula copied to clipboard

[Usage question]: Implement drag and drop in a grid using a single list

Open chetankh23 opened this issue 7 years ago • 2 comments

REQUIRED: Before filing a usage question

Use case description (required)

I have a grid with several rows and 2 columns. This grid has empty containers referring to the droppable area. Depending on the row and column value, some of the empty containers can be populated with cards. Now these cards should be draggable to other empty containers in both directions i.e horizontally and vertically. I took the look at this reference https://valor-software.com/ng2-dragula/index.html. The very first example is what I want to achieve. However, the examples shown use 2 different lists and 2 separate div's. How can I achieve this feature using a single list inside a single div element ?

Can you show a demo, or a picture of what you want to achieve? Please follow the first example on this link -> https://valor-software.com/ng2-dragula/index.html

Additional context

chetankh23 avatar Dec 02 '18 19:12 chetankh23

Just use CSS grid to lay them out?

cormacrelf avatar Feb 14 '19 03:02 cormacrelf

I have a div with style display: flex and the list of images inside this div. http://joxi.ru/a2Xv518c1x5Ljr when i drag img in the top row it's work fine, but when i drag img vertically all images starts "dancing"

I set option direction: 'horizontal', cause with 'vertical' direction works more badly)

How can I fix that?

P.S. Thank you for your work (amazing lib) and sorry for my bad English)

Belouccio avatar Mar 22 '19 12:03 Belouccio