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

Allow percentages for x/y/width/height options #2

Closed
gilmoreorless opened this Issue Jun 17, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@gilmoreorless
Owner

gilmoreorless commented Jun 17, 2012

A suggestion was made to add helpers for testing the nearest element(s) to the top/bottom/left/right edges of the screen.
The current workaround is to use arbitrary large values (e.g. {x: 0, h: 999999} for the left edge).

What would be better is allowing percentage values, that equate to a percentage of the page's width/height, so the above example could be {x: 0, h: '100%'}

This could also allow shortcuts like {x: '50%', y: '50%'} for the centre of the page.

@gilmoreorless

This comment has been minimized.

Show comment
Hide comment
@gilmoreorless

gilmoreorless Oct 23, 2012

Owner

Added support for percentage strings in version 1.2. A demo is at http://gilmoreorless.github.com/jquery-nearest/demo-edges.html

Owner

gilmoreorless commented Oct 23, 2012

Added support for percentage strings in version 1.2. A demo is at http://gilmoreorless.github.com/jquery-nearest/demo-edges.html

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