()
| 45 | } |
| 46 | |
| 47 | draw() { |
| 48 | ctx.beginPath(); |
| 49 | ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false); |
| 50 | ctx.fillStyle = this.color; |
| 51 | ctx.fill(); |
| 52 | } |
| 53 | |
| 54 | isMouseOver(mouseX, mouseY) { |
| 55 | // Increase the draggable area by checking if the mouse is within a larger radius |