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?] onUpdate fires continuously despite not calling requestUpdate or requestUpdateOnNextTick #494

Open
artichox opened this issue Sep 11, 2015 · 2 comments

Comments

@artichox
Copy link

I don't know where or why onUpdate is being triggered, but you can see in this working example that the onUpdate in the CurriculumMenu is being called continuously. In no onUpdate callbacks do I call requestUpdate or requestUpdateOnNextTick.

https://github.com/artichox/example-of-famous-onupdate-bug

@artichox artichox changed the title onUpdate fires continuously despite not calling requestUpdate or requestUpdateOnNextTick [Bug?] onUpdate fires continuously despite not calling requestUpdate or requestUpdateOnNextTick Sep 11, 2015
@trusktr
Copy link
Contributor

trusktr commented Sep 18, 2015

I think that's a bug. What happens if instead of passing this (@) into the requestUpdateOnNextTick call you make a component, then pass the component ID into requestUpdateOnNextTick (hen you add the component with addComponent, it returns the component ID).

@Arnleif
Copy link

Arnleif commented Jan 21, 2016

Hi. I wanted to report a bug I've found related to update/onupdate and then I saw your problem.

in core/Transform.js multiply (out, a, b) function (In Famous)

there are lines like this:
changed = changed ? changed : out[0] === res;

which is wrong as changed will be true if there were no changes.
out[0] !== res;
would be correct, and that stops the updates from being called again each frame.

A

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