The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
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.
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.
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.