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 => {