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

Feature Request: snap to container edge? #91

Open
albell opened this issue Jun 22, 2015 · 4 comments
Open

Feature Request: snap to container edge? #91

albell opened this issue Jun 22, 2015 · 4 comments

Comments

@albell
Copy link

albell commented Jun 22, 2015

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.

@desandro
Copy link
Owner

desandro commented Jun 23, 2015

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

@dominikwilkowski
Copy link

👍

@edu2004eu
Copy link

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).

@imjared
Copy link

imjared commented Jul 19, 2016

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

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

No branches or pull requests

5 participants