percolatestudio / meteor-momentum

Reactive animation package for Meteorjs
https://atmospherejs.com/percolate/momentum
MIT License
166 stars 22 forks source link

Cannot change animation #36

Open ghost opened 9 years ago

ghost commented 9 years ago

hey.... the animation won't change after the page is loaded, i currently have 2 pages i set the animation: A to B : growl B to A : fade

when i start to open the application from B to A the animation is fade when i start to open the application from A to B the animation is growl

i wonder why this is happening, it shouldn't be like that right? Thank You,

Code :

HomeTemplate.html

<template name="master_home">
    <div class="bg">                
        {{#momentum plugin=data}}
            {{> yield }}
        {{/momentum}}
    </div>
</template>

signup.html

<template name="signup" >
...
</template>

home.html

<template name="home" >
...
</template>

route:

Router.route('/',{  
    layoutTemplate:'master_home',
    data: function(){return {data:'left-to-right'}},
    action: function(){        
      this.render('home');
    }
});
Router.route('/signup',{  
    layoutTemplate:'master_home',
    data: function(){return {data:'right-to-left'}},
    action: function(){         
       this.render('signup');    
    }
});

Thank You.

tmeasday commented 9 years ago

Hi @Spycomb - you can't change the plugin reactively in this way right now. Probably it makes sense that you should be able to.