curveTo and mouse events recognition, redrawing when touchup