mousedown/mousemove bug?

Canvas specific discussion
oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19
mousedown/mousemove bug?

Post by oldgearguy » 20 Feb 2015 13:55

I can kind of understand, but I still think it's a bug.

If you create 2 scripts, one executing on mousedown and the other executing on mousemove, both get called for the initial click into the area.

In most scenarios, this isn't a big deal, but if you're doing drawing based on mouse movements or saving off the points in an array, you end up with 2 identical entries in array positions 0 and 1 if you store the initial 'pen down' position with the mousedown event.

You also get 2 scripts executing 'at the same time' and order of execution may not be guaranteed, so it could cause strange behaviors some of the time.

Post Reply