Skip to content

Commit

Permalink
hotfix: DPI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mlyubimov committed Oct 9, 2023
1 parent f8e5448 commit 748e0f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/util/flipperPlotter/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 748e0f3

Please sign in to comment.