Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velocity options #21

Open
artfree opened this issue Sep 3, 2015 · 12 comments
Open

Velocity options #21

artfree opened this issue Sep 3, 2015 · 12 comments

Comments

@artfree
Copy link

artfree commented Sep 3, 2015

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
Copy link
Owner

ccorcos commented Sep 3, 2015

@artfree
Copy link
Author

artfree commented Sep 3, 2015

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 #21 (comment) . https://github.com/notifications/beacon/ANGaMyiwbfu_SRbU11fWXbm5UMbr8iI1ks5ot9DegaJpZM4F2_ft.gif

@artfree
Copy link
Author

artfree commented Sep 21, 2015

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
Copy link
Owner

ccorcos commented Sep 21, 2015

  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
Copy link
Author

artfree commented Sep 21, 2015

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 #21 (comment) . https://github.com/notifications/beacon/ANGaM9-h9asH7vfw451Jtzfwin9ujWNJks5o0GDqgaJpZM4F2_ft.gif

@ccorcos
Copy link
Owner

ccorcos commented Sep 21, 2015

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

@artfree
Copy link
Author

artfree commented Sep 21, 2015

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
Copy link
Owner

ccorcos commented Sep 21, 2015

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

@artfree
Copy link
Author

artfree commented Sep 21, 2015

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

@artfree
Copy link
Author

artfree commented Sep 21, 2015

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
Copy link
Author

artfree commented Sep 22, 2015

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
Copy link
Owner

ccorcos commented Sep 22, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants