From 367cb425076d3f77e0dae1b02f1b939366449cb4 Mon Sep 17 00:00:00 2001 From: "Sean S. LeBlanc" Date: Mon, 24 May 2021 14:21:10 -0400 Subject: [PATCH] fix: don't set hover colour unless drawing hover --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6f25629..793c7ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -213,8 +213,8 @@ export default class Draw1Bit { } // hover this.context.globalCompositeOperation = 'difference'; - this.context.fillStyle = this.colorHover; if (this.hovered && this.x >= 0 && this.y >= 0 && this.x < this.width && this.y < this.height && !this.locked[k(this.x, this.y)]) { + this.context.fillStyle = this.colorHover; this.context.fillRect(this.x * r, this.y * r, 1 * r, 1 * r); } // gridlines