Skip to content
Snippets Groups Projects
Commit 1afc07d6 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix dpr issue

parent 5fbb59bc
No related branches found
No related tags found
No related merge requests found
......@@ -128,7 +128,7 @@ import { AtlasCmptConnModule } from "src/atlasComponents/connectivity";
})
}
const { x, y, width, height } = param
const { devicePixelRatio: dpr } = window
const { devicePixelRatio: dpr = 1 } = window
return new Promise(rs => {
const subCanvas = document.createElement('canvas')
subCanvas.width = width * dpr
......@@ -154,6 +154,8 @@ import { AtlasCmptConnModule } from "src/atlasComponents/connectivity";
height * dpr
)
context.scale(dpr, dpr)
subCanvas.toBlob(blob => {
const url = URL.createObjectURL(blob)
rs({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment