This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { toLeft, toRight } from 'ember-animated/transitions/move-over'; | |
export default Controller.extend({ | |
activeTab: 1, | |
rules({ firstTime, newItem, oldItem }) { | |
// Only animate on change, not on the initial value. | |
if (firstTime) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Route from '@ember/routing/route'; | |
export default Route.extend({ | |
queryParams: { | |
activeTab: { replace: true } | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default Controller.extend({ | |
activeTab: 1 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@ember/component'; | |
import { easeIn, easeInAndOut, easeOut } from 'ember-animated/easings/cosine'; | |
import move from 'ember-animated/motions/move'; | |
export default Component.extend({ | |
transition({ insertedSprites, keptSprites, removedSprites }) { | |
// Removed sprites should exit to the right side of the window. We use | |
// easeIn here so they start with no momentum and gradually speed up until | |
// they leave the screen at top speed. | |
removedSprites.forEach(sprite => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { toLeft, toRight } from 'ember-animated/transitions/move-over'; | |
export default Ember.Controller.extend({ | |
activeTab: 1, | |
rules({ firstTime, newItems, oldItems }) { | |
if (firstTime) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import move from 'ember-animated/motions/move'; | |
export default Ember.Component.extend({ | |
transition({ insertedSprites, keptSprites, removedSprites }) { | |
removedSprites.forEach(sprite => { | |
sprite.endAtPixel({ x: window.innerWidth }); | |
move(sprite); | |
}); | |
keptSprites.forEach(move); |
NewerOlder