seiyria / dropsort.js

A drag/drop/sortable replacement to jQuery UI
MIT License
2 stars 1 forks source link

clone drag mode screws up other elements #4

Open seiyria opened 10 years ago

seiyria commented 10 years ago

Probably because it creates a position:absolute and other elements fall out of flow. I don't know how to fix this but I think this is fine.

http://plnkr.co/edit/vDHEzoEZwmkIGtKh91DR?p=preview

@j-ro - here's an updated version where you can set the clone option on drag. It took a surprising amount of time to get that to work.

seiyria commented 10 years ago

@j-ro I saw your comment via email, but I'm not sure if you still have those questions since the comment isn't showing up on github. Were you still curious or did you resolve those issues?

j-ro commented 10 years ago

Huh...weird, yes I do!

seiyria commented 10 years ago

The expected behavior is that the other elements don't move, but I'm not sure how to make it work like that. For now, I'm fine with how it is.

.gets-dragged is just a placeholder class to signify that they should be dragged along, ie, added to dragAnchors. dragAnchors are carried along with the object being dragged.

j-ro commented 10 years ago

Hm...my opinion is that we shouldn't have a gets dragged option, actually. If you want stuff to drag together, put it all together in a div and make that container div the draggable thing. I think you're going to get impossible to solve layout issues with this implementation.

seiyria commented 10 years ago

Well, here's the thing. I absolutely need to be able to drag multiple items when doing a sortable, because I need to be able to do this. I think I would like to support it even if it is not supported very well.

j-ro commented 10 years ago

gotcha -- I think you're going to find that really hard to get working unless you go for their solution, combining the multiselected things into one draggable element.

seiyria commented 10 years ago

That is the default helper I intend to provide when generating that element. I have a few ideas for other helpers to show, too.

On Mon, Jul 21, 2014 at 6:32 PM, Jason Rosenbaum notifications@github.com wrote:

gotcha -- I think you're going to find that really hard to get working unless you go for their solution, combining the multiselected things into one draggable element.

— Reply to this email directly or view it on GitHub https://github.com/seiyria/dropsort.js/issues/4#issuecomment-49680290.