Skip to content

Option to only scroll up and option to set an offset to the final position#8

Open
oleics wants to merge 1 commit into
Arwid:masterfrom
Locadi:master
Open

Option to only scroll up and option to set an offset to the final position#8
oleics wants to merge 1 commit into
Arwid:masterfrom
Locadi:master

Conversation

@oleics

@oleics oleics commented Apr 8, 2013

Copy link
Copy Markdown

We need two features:

Scroll one item of a long list to the top of the browser window - and only to the top of it. I called the option .alignWithTop with respect to the native .scrollIntoView() and its alignWithTop-argument. The type of .alignWithTop is boolean.

The second feature is an option to set some offset to the position to scroll to. I called the option .offset. The type of .offset is number || integer.

This PR implements both.

@Arwid

Arwid commented Apr 9, 2013

Copy link
Copy Markdown
Owner

Great idea. .offset is useful. For .alignWithTop, it would be nice for it to fully imitate what it does in the native function; not only align to top if true, but align to bottom if false, and to force the alignment even if the element is already in view. With that in mind, something like {align:"top|bottom|auto", force:true|false} could do the trick, where {align:"auto", force:false} would be the default configuration and {align:"top", force:true} would match the native function. Thoughts?

@dotnetwise

Copy link
Copy Markdown

Is this ever being considered?

@pherrymason

Copy link
Copy Markdown
Contributor

+1

1 similar comment
@qstosh

qstosh commented Jun 27, 2014

Copy link
Copy Markdown

+1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants