From 748e0f3aeae8d5877b507e5cf0f1e98e6ec5e3f4 Mon Sep 17 00:00:00 2001 From: m_lyubimov Date: Mon, 9 Oct 2023 14:55:41 +0400 Subject: [PATCH] hotfix: DPI fix --- frontend/src/util/flipperPlotter/worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/util/flipperPlotter/worker.js b/frontend/src/util/flipperPlotter/worker.js index da1fd06..68a06c2 100644 --- a/frontend/src/util/flipperPlotter/worker.js +++ b/frontend/src/util/flipperPlotter/worker.js @@ -24,7 +24,7 @@ self.onmessage = (e) => { case 'setConfigContext': width = e.data.width height = e.data.height - dpi = 1 + dpi = e.data.dpi break case 'setData': data = JSON.parse(e.data.data) @@ -66,9 +66,9 @@ self.onmessage = (e) => { const context2d = (canvas, width, height, dpi) => { const context = canvas.getContext('2d', { desynchronized: true }) - context.scale(dpi, dpi) canvas.width = Math.floor(width * dpi) canvas.height = Math.floor(height * dpi) + context.scale(dpi, dpi) return context }