(type)
| 8 | } |
| 9 | |
| 10 | activate(type) { |
| 11 | this.type = type; |
| 12 | this.state = {}; |
| 13 | if (type === 'line' || type === 'brush' || type === 'eraser' || type === 'arrow') { |
| 14 | this.ctx.lineJoin = 'round'; |
| 15 | } else { |
| 16 | this.ctx.lineJoin = 'miter'; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | setLineWidth(width) { |
| 21 | if (`${width}`.match(/^\d+$/)) { |
no outgoing calls
no test coverage detected