Drawing Tool

Basic Features

Step 4: Add event listeners to the canvas for when the user holds down the mouse, moves it around, and releases it.
Hint: Use mousedown, mousemove, and mouseup event listeners:
yourCanvasVariable.addEventListener(`mousedown`, startDrawing)
yourCanvasVariable.addEventListener(`mousemove`, draw)
yourCanvasVariable.addEventListener(`mouseup`, stopDrawing)
Last step Next step