Should a dot be drawn on touch when a line is drawn on touch move?
Please see my pen at http://codepen.io/jacorre/pen/woyNXG.
On a Windows desktop PC, if I click around, nothing is drawn. If I click and drag, a line is drawn. This is what I expect since I specify to draw a line on mouse dragged.
On an Android mobile device, if I touch around, a dot is drawn. If I touch and move, a line is drawn. Why is a dot being drawn on touch? Is this a bug or am I'm doing something wrong?
On an iPad, I get results like Windows desktop.
Thank you!
with a touch device, mousePressed() maps to touchStarted() and mouseDragged() maps to touchMoved(). so this is why you're seeing this behavior. there isn't really an idea of dragged vs moved on touch devices like there is with a mouse. if you don't want this to happen, you could define a separate touchMoved() event that doesn't do anything.
I don't want a dot to be drawn where I touch. I only want a line to be drawn where I touch move.
Since mouse dragged is equivalent to touch moved then I don't think I need to define a touch moved event.
I don't understand why a simple touch would draw a dot if drawing is meant to be done when dragging your finger around on the screen? Does a touch trigger a touch move as well?
would you mind posting this question on the forum and we can try debugging over there? thanks!
I had posted it in a different manner on the forum prior to posting it here.