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

Allow calling scrollVertical with only the target #18

Merged
merged 1 commit into from
Dec 18, 2015

Conversation

corrspt
Copy link

@corrspt corrspt commented Dec 18, 2015

Hi,
I noticed that all options for the scrollVertical method of the service are optional but you need to pass an empty object as options.

This PR makes the opts default to an empty object, allowing us to call scrollVertical('target') instead of scrollVertical('target', {})

All the options are optional, but if an empty object is not passed
the `scrollVertical` method blows up with cannot reat offset of undefined.

Now we can scrollVertical('#id') instead of having scrollVertical('#id',{});
@blimmer
Copy link
Collaborator

blimmer commented Dec 18, 2015

Seems sane to me

@corrspt
Copy link
Author

corrspt commented Dec 18, 2015

Thanks a lot for the addon by the way 👍 This is just a micro-contribution for an issue I ran into (and thought that other people might have as well)

@blimmer
Copy link
Collaborator

blimmer commented Dec 18, 2015

Thanks, appreciate it! I don't have write on this repo so @jasonkriss will need to merge at his convenience. If you have any time to help us with #8 @corrspt that would be really awesome!

@jasonkriss
Copy link
Collaborator

I agree with @blimmer. LGTM. Thanks a lot @corrspt!

jasonkriss added a commit that referenced this pull request Dec 18, 2015
Allow calling `scrollVertical` with only the target
@jasonkriss jasonkriss merged commit 557b6e6 into ragnarpeterson:master Dec 18, 2015
@jasonkriss
Copy link
Collaborator

@blimmer Just gave you write access btw. Seems silly that you wouldn't have it at this point.

@blimmer
Copy link
Collaborator

blimmer commented Dec 18, 2015

Thanks @jasonkriss !

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.

3 participants