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

"Offset" support #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alexkingorg
Copy link

Not sure if this would be valuable to you as part of the main codeline or not, but for my needs I wanted to be able to define an "offset" - a buffer by which I wanted to the element being scrolled into view to be away from the edge of the browser.

I've only implemented this in the vertical settings for now (additional option of "offset"), but it would be pretty easy to add to the horizontal as well. If you'd like me to clean it up for you, let me know and I'll give it a shot. If you want to rewrite it in your own hand, that's perfectly fine as well.

I hope this is useful and thanks for the very useful plugin!

@annismckenzie
Copy link

Nice, thank you! That was exactly what I was looking for. A offset: center would probably also be useful (scrolling the element so it's vertically centered within the visible area of the screen).

@dipth
Copy link

dipth commented Mar 26, 2013

👍

@timmfin
Copy link

timmfin commented Sep 30, 2013

+1 to merging in (and documenting) this!

@mark0978
Copy link

Wouldn't offset: middle be more in line with vertical centering?

@timmfin
Copy link

timmfin commented Sep 30, 2013

For me, this isn't about centering. Rather is it about having a slight buffer so that the scrolled-to-item isn't immediately flush with the edge of the container (making it a hair more visually pleasing).

@litera litera added the Feature label Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants