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

[bug?] Animated size doesn't show until resizing the window. #390

Closed
trusktr opened this issue Jul 4, 2015 · 5 comments
Closed

[bug?] Animated size doesn't show until resizing the window. #390

trusktr opened this issue Jul 4, 2015 · 5 comments

Comments

@trusktr
Copy link
Contributor

trusktr commented Jul 4, 2015

Steps to reproduce:

# installs meteor if you don't have it:
curl https://install.meteor.com/ | sh

git clone https://github.com/trusktr/meteor-famous-playground.git
git checkout d80af785d99cffdff5320e51442304c3a7e5113a
meteor

It works at that point, we see rectangles that animate into place, the ones at the top of the formation are elongated.

Now uncomment all the stuff on these lines (including the done args): L105-L114

Now, the difference after uncommenting those lines/args is that now the size animation doesn't work. We see the rectangles animate into place, but the ones at the top of the formation aren't elongated.

Now if we resize the browser window we see the rectangles suddenly become their expected sizes!

@jd-carroll
Copy link
Contributor

@trusktr I have a feeling that this is related to the first frame from the FamousEngine. The first frame is actually a dead frame, and if your root node uses absolute sizing, the first two frames are dead.

What I mean by this is that incorrect or no size information will be available on the parent node (Scene). When a scene is created, internally a Context is created. The Context will send a NEED_SIZE_FOR command to get the size of the selector used for the scene (either <body> or a custom selector you entered).

The issue is that the frame (FamousEngine.step) is processed before the NEED_SIZE_FOR command, thus the first frame is dead. And since absolute sizing is asynchronous (frame + 1), the second frame would also be dead.

My suspicion is that you are running into this issue somehow, but I have not had an opportunity to really do a deep dive into the code. At the very least, this is something that should be kept in mind.

@trusktr
Copy link
Contributor Author

trusktr commented Jul 5, 2015

@jd-carroll Interesting. So it goes wrong when I uncomment all that stuff, which means the animations don't even begin until much later, at least 3 seconds for the initial animation when the rectangles go into place, and 5 seconds for the size animation. These happen much after the 2 initial frames; would that still affect this? I'm also using absolute sizing.

@jd-carroll
Copy link
Contributor

Maybe not, I looked through the code again and it does not look like you
are caching the parent size anywhere so this may not be the problem.

On Sun, Jul 5, 2015 at 1:42 PM, Joseph Orbegoso Pea <
[email protected]> wrote:

@jd-carroll https://github.com/jd-carroll Interesting. So it goes wrong
when I uncomment all that stuff, which means the animations don't even
begin until much later, at least 3 seconds for the initial animation when
the rectangles go into place, and 5 seconds for the size animation. These
happen much after the 2 initial frames; would that still affect this? I'm
also using absolute sizing.


Reply to this email directly or view it on GitHub
#390 (comment).

@trusktr
Copy link
Contributor Author

trusktr commented Jul 5, 2015

@jd-carroll That's a nice thing to know though! Thanks for sharing those bytes. (:

@trusktr
Copy link
Contributor Author

trusktr commented Aug 23, 2015

This bug is the same as #478. Closing this one for that one.

@trusktr trusktr closed this as completed Aug 23, 2015
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

3 participants
@trusktr @jd-carroll and others