-
Notifications
You must be signed in to change notification settings - Fork 56
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
configurable scroll element #67
configurable scroll element #67
Conversation
README.md
Outdated
@@ -10,6 +10,15 @@ | |||
ember install ember-router-scroll | |||
``` | |||
|
|||
### Options | |||
You can specify the id of an element for which the scroll position is saved and set. Default is `window` for using the scroll position of the whole viewport. You can pass an options object in your applications `config/environment.js` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
application's
config/environment.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktrhn can you put in an apostrophe in the word "application"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have in the last commit: 370bb90#diff-04c6e90faac2675aa89e2176d2eec7d8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
addon/index.js
Outdated
window.scrollTo(scrollPosition.x, scrollPosition.y); | ||
if ('window' === scrollElement) { | ||
window.scrollTo(scrollPosition.x, scrollPosition.y); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove line.
addon/services/router-scroll.js
Outdated
if ('window' === scrollElement) { | ||
x = window.scrollX; | ||
y = window.scrollY; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove line.
Makes the scrolled element configurable. Should propably solve #56