From 0724e6842325e5436889baa56472d4d15c8adaf0 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Mon, 14 Nov 2022 14:32:51 -0600 Subject: [PATCH] add willReadFrequently attribute to radar context --- server/scripts/modules/radar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/modules/radar.js b/server/scripts/modules/radar.js index 52b120f..a7700aa 100644 --- a/server/scripts/modules/radar.js +++ b/server/scripts/modules/radar.js @@ -170,7 +170,7 @@ class Radar extends WeatherDisplay { const cropCanvas = document.createElement('canvas'); cropCanvas.width = 640; cropCanvas.height = 367; - const cropContext = cropCanvas.getContext('2d'); + const cropContext = cropCanvas.getContext('2d', { willReadFrequently: true }); cropContext.imageSmoothingEnabled = false; cropContext.drawImage(workingCanvas, radarSourceX, radarSourceY, (radarOffsetX * 2), (radarOffsetY * 2.33), 0, 0, 640, 367); // clean the image