Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bttf committed Apr 1, 2016
2 parents 9b55f9a + 27e1b5c commit 2b82290
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This ember-cli addon provides two route mixins that will handle scroll preservation and resetting. Read more for details.

## [Theme music](https://www.youtube.com/embed/cA9gUspn6gc)(recommended)
(Please mentally replace the word 'smooth' with 'scroll'.)
## [Theme music](https://www.youtube.com/embed/cA9gUspn6gc)
(Recommended listening; please mentally replace the word 'smooth' with 'scroll'.)

## ScrollOperatorMixin

This will save the scrolling position of a route. When the route is re-entered, it will automatically scroll to the previously saved position *only if accessed by the browser's forward and back buttons*. Accessing the route via link-to or address bar will not trigger this behavior. This is by design in order to more closely emulate the HTML experience.

```
```javascript
import ScrollOperatorMixin from 'ember-scroll-operator/mixins/scroll-operator';

export default Ember.Route.extend(ScrollOperatorMixin, {
Expand Down Expand Up @@ -44,7 +44,7 @@ export default Ember.Route.extend(ScrollOperatorMixin, {

A simple mixin to ensure that a route is always scrolled to the top when accessed.

```
```javascript
import ResetScrollMixin from 'ember-scroll-operator/mixins/reset-scroll';

export default Ember.Route.extend(ResetScrollMixin, {
Expand Down

0 comments on commit 2b82290

Please sign in to comment.