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

onMouseDrag bleeding into next drag #981

Closed
lehni opened this issue Feb 17, 2016 · 0 comments
Closed

onMouseDrag bleeding into next drag #981

lehni opened this issue Feb 17, 2016 · 0 comments

Comments

@lehni
Copy link
Member

lehni commented Feb 17, 2016

As reported by Noah Levine on the mailing list:

I'm starting a new project with paper.js after not having looked at the library since june 2015. i'm noticing that the onMouseDrag events in the tutorial/documentation now affect the next drag after the user has completed the onMouseUp.

as an example: in the drag example that produces a line of circles, when you lift the mouse and start another drag, it creates a giant circle, or chain of circles connecting the two drags. I think this has something to do with event.delta using the last point from the last time the event fired. but this didn't use to be a problem with the library - you used to have distinct lines produced when the mouse was lifted and a new drag began.

does anyone have a solution to this or know why this is happening / how to avoid it?

I've attached a screenshot showing the effect. This is happening on the tutorial page as well, but I tested it myself to be sure.

screen shot 2016-02-16 at 10 12 40 am

The large circle in the middle is produced when the mouse is clicked and dragged a second time to produce the bottom line running right to left. The lines become connected by the large circle for some reason, which is so large I think because it's using the event.delta from the end of the last line to the new one, instead of starting a new chain altogether.

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

1 participant