Removed `console.log`.
Renamed canvas variable name.

It was shadowing the main canvas variable which declared at top.
Implemented `setReadOnly` method.

Calling `setReadOnly` with `true` parameter will make the canvas not editable. To return the canvas the drawing state `setReadOnly` should be called again with `false` parameter.