Answer the question
In order to leave comments, you need to log in
What drag-n-drop plugin, preferably with a vue wrapper, can do this?
Good afternoon. It is necessary to implement card dragging (manual sorting), but with a certain condition.
Cards must be replaced strictly vertically, strictly horizontally, and also diagonally. For example, there are 10 cards in two rows:
1 2 3 4 5
6 7 8 9 10
If you take a unit and drag it to the right, then a deuce will take its place. Those. 1 will swap places with 2. Well, or if you drag it to 5, then 2, 3, 4, 5 will move to the left and 1 will fall into place of 5.
And if you drag the unit down, then you need it to change places with 6. 6 would be in the first position at the top, and 1 - in the first position below.
And if there is a desire to drag 6 to place 3, then 3, 4, 5 are shifted to the left, and 5, due to "lack of space", falls down to the first position of the second line.
Do I want too much, and is this possible in principle? Because it assumes one logic for horizontal and diagonal dragging, and a completely different one for vertical dragging.
I tried many different plugins, but they usually only do one thing.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question