Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Drag and Drop #539

Open
tk2232 opened this issue Jan 8, 2020 · 3 comments
Open

Multiple Drag and Drop #539

tk2232 opened this issue Jan 8, 2020 · 3 comments
Labels

Comments

@tk2232
Copy link

tk2232 commented Jan 8, 2020

Is it possible to add an example for multiple drag and drop.
Select multiple items and drag them together.
I have no idea how to implement that.

@cormacrelf
Copy link
Owner

Trick is you can’t actually have more than one skyhook drag source dragged at once, so you have to simulate it by having a complex drag preview that looks like it has picked up multiple items. If you feed the preview a list of items that were ticked just prior to dragging the last item, it could render a stack, a number (7 items) or even a bunch of little previews scaled from their original positions. You just need to write the tick selection mechanism. (Shift clicking events caught with mousetrap.js would also work and be easier to cancel.)

@tk2232
Copy link
Author

tk2232 commented Jan 10, 2020

I tried a few solutions, but none that worked properly. Multisort is not the problem. I have difficulties with the preview and I have no idea how to connect this list with another list. Is there no dragTarget in angular-skyhook/sortable?

https://stackblitz.com/edit/angular-skyhook-select-drag-preview?embed=1&file=src/app/simple/simple.component.ts

@olexme
Copy link

olexme commented Feb 3, 2020

Here is example of working preview for multi selection. It was done for agGrid but idea should be similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants