ccorcos / meteor-transitioner

Meteor page transitions integrated with Iron Router.
79 stars 7 forks source link

Velocity options #21

Open artfree opened 9 years ago

artfree commented 9 years ago

In your 'getting started' document:

Transitioner.transition({ fromRoute: 'fromRouteName', toRoute: 'toRouteName', velocityAnimation: { in: animation, out: animation } }) You say there are three options for animation, the second being: "passing an array of velocity arguments". I can't get this to work. Could you show a specific example (specific syntax) for this? - for example, adjusting the duration of the transition.

Thanks much.

ccorcos commented 9 years ago

like this? https://github.com/ccorcos/meteor-transitioner/blob/master/example/client/main.coffee#L94

artfree commented 9 years ago

A thing of beauty! Thank you !!

From: Chet Corcos [mailto:notifications@github.com] Sent: Wednesday, September 02, 2015 10:24 PM To: ccorcos/meteor-transitioner Cc: Art Freeman Subject: Re: [meteor-transitioner] Velocity options (#21)

like this? https://github.com/ccorcos/meteor-transitioner/blob/master/example/client/main.coffee#L94

— Reply to this email directly or view it on GitHub https://github.com/ccorcos/meteor-transitioner/issues/21#issuecomment-137335183 . https://github.com/notifications/beacon/ANGaMyiwbfu_SRbU11fWXbm5UMbr8iI1ks5ot9DegaJpZM4F2_ft.gif

artfree commented 9 years ago

Hi Chet,

Two issues: 1) I still have to follow the .transition statement (above) with Router.go(..) Am I missing something? Is the transition statement just a setup for the 'go' statement? 2) When I transition from a page with input fields and then return to that page later, the input fields are broken - in the sense that they're registering old field values (the values the input fields had before the transition). The input fields are blank when returning to the original page, but when checking their values, the old values show up. When I disable Transitioner, this problem goes away. Any ideas why?

Thanks again. Art Freeman

ccorcos commented 9 years ago

1) yes 2) this transitioner doesnt do well with transitioning between routes that have the same pattern. Is that whats going on? perhaps the two pages are /user/:id withdifferent ids?

artfree commented 9 years ago

Hi Chet,

For (2):

I’m transitioning from the root directory - Router.route('/',{name: 'login'}); to any other page and then, if the ‘logout’ button is pressed, returning to the login page (to the root directory). When returning to that login page, the email and password fields are corrupted.

Art.

From: Chet Corcos [mailto:notifications@github.com] Sent: Monday, September 21, 2015 1:33 PM To: ccorcos/meteor-transitioner Cc: Art Freeman Subject: Re: [meteor-transitioner] Velocity options (#21)

1) yes 2) this transitioner doesnt do well with transitioning between routes that have the same pattern. Is that whats going on? perhaps the two pages are /user/:id withdifferent ids?

— Reply to this email directly or view it on GitHub https://github.com/ccorcos/meteor-transitioner/issues/21#issuecomment-142100469 . https://github.com/notifications/beacon/ANGaM9-h9asH7vfw451Jtzfwin9ujWNJks5o0GDqgaJpZM4F2_ft.gif

ccorcos commented 9 years ago

I dont quite understand the issue. The form fields aren't being cleared?

artfree commented 9 years ago

The form fields are being cleared, as is expected upon return to the login page. However, when I do a $(..).val() on those fields, the original values (from the first transition out) are still there and they persist so that I can't login as another user. In other words, the fields look to be cleared, but they're not, and they can't be reassigned. Hope my explanation doesn't add to the confusion :)

ccorcos commented 9 years ago

not sure whats going on there honestly. soiunds like a classic browser quirk to me

artfree commented 9 years ago

Happens in both Chrome and Firefox. I'll keep digging. Thanks.

artfree commented 9 years ago

Could you elaborate on what you meant, above (this transitioner doesnt do well with transitioning between routes that have the same pattern. Is that whats going on? perhaps the two pages are /user/:id withdifferent ids? ) Not sure what you mean by patterns. Could you give a few sampe routes that are problematic? Thx.

artfree commented 9 years ago

Hey Chet, Disregard last post. I get it about same pattern routes. I had all mine defined to echo the exact folder path of each template. Not needed at all. So, I just defined the routes as single phrases to describe what was happening (and that's all that'll be reflected in the URL). Anyways, now transitioner works fine. Maybe something you'd want to look at though - why 'same pattern' routes are problematic.

I can see using velocity alone to fade in a new route, or even fade out of an old one. But how do you get the fades working in both directions simultaneously - given that the templates change abruptly? Do you use some sort of iron router hooks, or ??

ccorcos commented 9 years ago

i use tracker autoron on the iron router route name to set variables, and I use _uihooks to manage the animations.