Stop drawing when mouse is released outside of the canvas
This commit is contained in:
		
							parent
							
								
									5677ca013d
								
							
						
					
					
						commit
						6a827fa4b2
					
				| @ -20,7 +20,7 @@ canvas.addEventListener('mousedown', (e) => { | ||||
|     y = e.offsetY | ||||
| }) | ||||
| 
 | ||||
| canvas.addEventListener('mouseup', (e) => { | ||||
| document.addEventListener('mouseup', (e) => { | ||||
|     isPressed = false | ||||
| 
 | ||||
|     x = undefined | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jelena Milanovic
						Jelena Milanovic