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

sortChildren on Chrome not working - works in Firefox #1059

Closed
danzen opened this issue Feb 7, 2021 · 1 comment
Closed

sortChildren on Chrome not working - works in Firefox #1059

danzen opened this issue Feb 7, 2021 · 1 comment

Comments

@danzen
Copy link
Contributor

danzen commented Feb 7, 2021

image

I put a couple circles in the holder, moved one to the right of the other a little and scaled it a little smaller.

In both the sorts below (tried independently), Firefox (pictured at right) on a PC worked properly and Chrome did nothing - no error... just no change.

holder.sortChildren((one,two)=>{return one.x<two.x})
holder.sortChildren((one,two)=>{return one.scale>two.scale})

In CreateJS the sortChildren just gets turned into a sort on what I assume is an array of children. So... not sure where it is breaking down. I tried a stage update in a timeout in case it was a timing issue but still the same results.

@danzen danzen added bug and removed bug labels Feb 7, 2021
@danzen
Copy link
Contributor Author

danzen commented Feb 7, 2021

Solved - seems Firefox accepts true and false but chrome does not - it needs 1, -1, 0

@danzen danzen closed this as completed Feb 7, 2021
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