ui icon indicating copy to clipboard operation
ui copied to clipboard

Envelope point sorting not working

Open chriskiefer opened this issue 7 years ago • 1 comments
trafficstars

this doesn't have any effect, at least in Chrome, leading to some mixed up envelopes when loaded using setPoints.

A workaround to fix this is:

            envelope.nodes.sort((a,b)=>{return a.x-b.x})
            envelope.render();

chriskiefer avatar Oct 12 '18 09:10 chriskiefer

I'm not able to duplicate this. Can you post an example of the error you are seeing?

Here is a codepen which adds points out of order and then shows them appearing sorted. We use the same sorting algorithm that you posted.

https://codepen.io/taylorbf/pen/qLZZgp

taylorbf avatar Dec 14 '18 17:12 taylorbf