muuri icon indicating copy to clipboard operation
muuri copied to clipboard

Contain dragged element's movement within a container

Open niklasramo opened this issue 7 years ago • 5 comments

This: http://api.jqueryui.com/sortable/#option-containment

niklasramo avatar May 07 '17 20:05 niklasramo

This is definitely a useful feature, but I wonder what should happen if the dragged element is outside the containment area when dragging starts? Snap edge to containment area? Allow moving the item only towards to containment area? Or what about if the item is larger than the containment area?

The tricky part here is handling the edge cases.

niklasramo avatar May 31 '17 20:05 niklasramo

And if a selector/element is used to define the containment area when do we fetch/update the containment area's dimensions and offsets? On initialization? On drag start? On scroll? On all of those events?

niklasramo avatar May 31 '17 21:05 niklasramo

how do we achieve this in muuri, to only drag items inside its parent div?

arunkmr25 avatar Jan 04 '19 13:01 arunkmr25

niklasramo can u help on this?

arunkmr25 avatar Jan 05 '19 07:01 arunkmr25

@arunkmr25 did you have a workaround for this?

ronster37 avatar Oct 18 '20 08:10 ronster37