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

Fix getStroke when there are multiple duplicates #18

Merged
merged 3 commits into from
Jun 28, 2021

Conversation

aaronsantiago
Copy link
Contributor

Using naive approaches to adding points, quite often we get hundreds of duplicates. Occasionally if duplicates happen in the correct sequence near the beginning of the points array, i would outpace the number of elements in strokePoints.

I'm unsure if there are better solutions to this but this change makes sense within the scope of the loop and fixes the problems in my project.

Using naive approaches to adding points, quite often we get hundreds of duplicates. Occasionally if duplicates happen in the correct sequence near the beginning of the points array, `i` would outpace the number of elements in strokePoints.

I'm unsure if there are better solutions to this but this change makes sense within the scope of the loop and fixes the problems in my project.
@vercel
Copy link

vercel bot commented Jun 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/steveruiz/perfect-freehand-example/33wvC4wQE71wXpUkovTtLNqDaMq9
✅ Preview: https://perfect-freehand-example-git-fork-aaronsantiag-8c0ce9-steveruiz.vercel.app

@steveruizok
Copy link
Owner

Thanks! This is a great catch.

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

Successfully merging this pull request may close these issues.

2 participants