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

Possible bug? #125

Closed
tinchox5 opened this issue Dec 7, 2015 · 4 comments
Closed

Possible bug? #125

tinchox5 opened this issue Dec 7, 2015 · 4 comments

Comments

@tinchox5
Copy link

tinchox5 commented Dec 7, 2015

Matt, in this working pen http://codepen.io/tinchox5/pen/eJYLMM I defined an Actor (new ui.Actor),then I set some properties (.set), and finally I put .sync(), like this:

var box = new ui.Actor({
element: '.box'
});
box.set({
values: {
originX: 0,
originY: 0,
distance: 180,
angle: 240,
opacity: 1,
x: {
transform: fromAngleAndDistance
},
y: {
transform: fromAngleAndDistance
}
}
}).sync();

I wanted to simplify some lines of code, so I did it this:
var box = new ui.Actor({
element: '.box',
values: {
originX: 0,
originY: 0,
distance: 180,
angle: 240,
opacity: 1,
x: {
transform: fromAngleAndDistance
},
y: {
transform: fromAngleAndDistance
}
}
}).sync();

The code isn't working anymore and Console shows : "Uncaught RangeError: Maximum call stack size exceeded"

Here is the new pen http://codepen.io/tinchox5/pen/eJYqaj

@mattgperry
Copy link
Collaborator

What browser are you testing this in? As I can't replicate this. However you no longer have to call sync yourself - I added it at the end of the Actor constructor after your feedback the other day.

@mattgperry
Copy link
Collaborator

Ah sorry you only don't have to call sync after the contructor - I didn't think about the set use case and will look into that too.

@tinchox5
Copy link
Author

tinchox5 commented Dec 7, 2015

I´m using chrome. Now its working!! Thanks

@mattgperry
Copy link
Collaborator

Glad to hear it : ) - If you see it again though please let me know - I'm certain there's a runaway infinite loop under specific conditions and its getting harder to replicate as the framework matures.

@tinchox5 tinchox5 closed this as completed Dec 7, 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

2 participants