fixed the lack of cancelAnimationFrame
click/drag to draw feature