From 5ca5257cc5c3cefb1825c8dd1ecb22fc919d27e3 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 1 Nov 2020 09:35:41 -0500 Subject: [PATCH] Fix the overlay not getting cleared properly when zoomed out --- xray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xray.js b/xray.js index 9529f78..fa283de 100644 --- a/xray.js +++ b/xray.js @@ -588,7 +588,7 @@ function updateOverlay(points, clicked) { overlayCtx.globalCompositeOperation = "source-over"; if (!paintMode) - overlayCtx.clearRect(0, 0, w, h); + overlayCtx.clearRect(0, 0, w / window.devicePixelRatio, h / window.devicePixelRatio); if (!paintMode || clicked) { points.forEach(point => {