draggabilly icon indicating copy to clipboard operation
draggabilly copied to clipboard

Feature Request: snap to container edge?

Open albell opened this issue 9 years ago • 4 comments

I'm trying to have an Adobe-style panel that snaps to the viewport edge. Basically, it's the containment option, but with an additional snapping behavior, with [x,y] proximity thresholds in pixels specified as you have now with grid. While I'm wishing, it would be useful if it fired an event (dock?), which could be used for later layout calcs. Thanks.

albell avatar Jun 22 '15 19:06 albell

Thanks for this feature request. Add a 👍 reaction to this issue if you would see this feature added.

desandro avatar Jun 23 '15 01:06 desandro

:+1:

dominikwilkowski avatar Nov 05 '15 06:11 dominikwilkowski

While it's a nice feature, it's actually pretty easy to implement yourself. Managed to get this working with ~15 lines of code (on the X axis only; Y axis should be similar).

edu2004eu avatar Jun 30 '16 09:06 edu2004eu

@edu2004eu Could you share those ~15 lines of code so people who have this issue can get some help?

imjared avatar Jul 19 '16 15:07 imjared