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

Regression in Drawing => disappearing dots #5753

Closed
niels-van-den-broeck opened this issue Jun 14, 2019 · 7 comments · Fixed by #5771
Closed

Regression in Drawing => disappearing dots #5753

niels-van-den-broeck opened this issue Jun 14, 2019 · 7 comments · Fixed by #5771

Comments

@niels-van-den-broeck
Copy link
Contributor

niels-van-den-broeck commented Jun 14, 2019

Version

3.1.0

Test Case

https://codesandbox.io/s/dots-disappearing-9vll1

Information about environment

Nodejs or browser?
Which browsers?

Chrome@latest
Others not tested

Steps to reproduce

draw dots on attached sandbox

Expected Behavior

dots stay

Actual Behavior

dots go away at random

@asturur
Copy link
Member

asturur commented Jun 15, 2019

i inspected the objects, between one disappeared and one not disappeared there are virtually no differences.
I have no idea what is happening.
Your code is fine.

I wonder if is a mutation problem.
we are resetting points doing points.length = 0, i wonder if is better to assign a new array completely.
And also the decimation and the convert to pathData could happen on a copy of the dots rather than the actual array.

@paulconlin
Copy link
Contributor

paulconlin commented Jun 19, 2019

Not sure if it's related, but the drawing demo also has an issue the paths moving when committed to the second canvas.

http://fabricjs.com/freedrawing

@Zahin-10
Copy link

I have been using a really old version 2.4.1 this issue doesn't seem to happen over here and we have been running it in production for a while now.

@asturur
Copy link
Member

asturur commented Jun 21, 2019

I'll change some code to see if i can fix, but i still miss a way to replicate the problem fast. Sometimes i have to add hundreds of dots before seeing one disappear

@asturur
Copy link
Member

asturur commented Jun 22, 2019

Found the issue, pushing a fix and publishing.

@niels-van-den-broeck
Copy link
Contributor Author

Thanks!

@niels-van-den-broeck
Copy link
Contributor Author

niels-van-den-broeck commented Jul 2, 2019

Not sure if it's related, but the drawing demo also has an issue the paths moving when committed to the second canvas.

http://fabricjs.com/freedrawing

I assume the version hasn't been bumped yet on the demo site but this has already been fixed earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants