Skip to content

Commit

Permalink
explode transition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreybiles committed Feb 6, 2016
1 parent abb5235 commit 5a31c96
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/templates/monsters/monster/show.hbs
@@ -1,10 +1,10 @@
{{#liquid-bind model class="liquid-monster" as |newMonster|}}
<div class="monster-card">
<span class="name">{{newMonster.name}}</span>
<span class="pull-right">Level: {{newMonster.level}}</span>
<span class="pull-right level">Level: {{newMonster.level}}</span>


<img src={{newMonster.imageUrl}} />
<img src={{newMonster.imageUrl}} class="monster-image" />
<br>
${{newMonster.price}}
</div>
Expand Down
13 changes: 12 additions & 1 deletion app/transitions.js
Expand Up @@ -18,6 +18,17 @@ export default function(){
)
this.transition(
this.hasClass('liquid-monster'),
this.use('toRight', {duration: 3000})
this.use('explode', {
pick: '.level',
use: 'toUp'
},{
pickNew: '.name',
use: 'toRight'
},{
pickOld: '.name',
use: 'toLeft'
}, {
use: ['fade', {duration: 500}]
})
)
}

0 comments on commit 5a31c96

Please sign in to comment.