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

Envelope point sorting not working #127

Open
chriskiefer opened this issue Oct 12, 2018 · 1 comment
Open

Envelope point sorting not working #127

chriskiefer opened this issue Oct 12, 2018 · 1 comment

Comments

@chriskiefer
Copy link

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();
@taylorbf
Copy link
Contributor

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

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