-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
I can't get force feeding to work #422
Comments
Ok. So I've fiddled around a little more ;) Force-feeding works. But on certain browsers (every time with firefox, sometimes with Safari, never with Chrome), you'll see a brief flash when the element is inserted before velocity catches it and moves it. For example, check out the slide left button on this demo: http://transition-demo.meteor.com/ P.S. I'm using velocity to make a much needed page transitioning package for meteor: https://github.com/ccorcos/meteor-transitioner And great job with this framework. |
Ok. Here we go: Here's the code: and here it is on CodePen: You'll notice there is a flash of red when you press the button |
@ccorcos that's because how you're inserting the second page into the DOM dynamically on click. Try giving us a clean example where the elements are present in the DOM before you move them around with Velocity. |
Yeah, I see. The problem for me is that this is the way meteor works. I'm given and insert and remove function and I need to to insert it into the dom and do this animation. The odd thing is that any of the built-in effects don't have this flickering problem: https://github.com/julianshapiro/velocity/blob/master/velocity.ui.js#L535 But the ones I wrote do have this problem:
Notice the difference between slideLeft and slideRight in this demo: http://transition-demo.meteor.com Any ideas? |
Taking a look now. |
The UI pack addresses the flashing by immediately setting I would try doing that with your code as well. Let me know how that works out. |
Interesting. I see whats going on here. Every effect animates opacity. Is it possible to immediately animate the opacity to prevent the flash? Here's what I have going right now...
|
oh shit, you're right! it's because you have to explicitly animate opacity in there. either throw it in as a dummy property (E.g. opacity: [ 1, 1]) or manually set opacity to 0 before the animation begins |
Much better! That works. Thanks. |
i suggest to remove the style attribute after the transition complete
|
This doesnt work...
It only works when I use a hook:
Am I missing something?
The text was updated successfully, but these errors were encountered: