diff --git a/src/ui/ui.module.ts b/src/ui/ui.module.ts index 55fff4982240b15dbce5fc0f33077760f62886e5..708649fd9aad63c7814d30eeea689076d68821a2 100644 --- a/src/ui/ui.module.ts +++ b/src/ui/ui.module.ts @@ -128,11 +128,10 @@ import { AtlasCmptConnModule } from "src/atlasComponents/connectivity"; }) } const { x, y, width, height } = param - const { devicePixelRatio: dpr } = window return new Promise(rs => { const subCanvas = document.createElement('canvas') - subCanvas.width = width * dpr - subCanvas.height = height * dpr + subCanvas.width = width + subCanvas.height = height const context = subCanvas.getContext('2d') context.drawImage( canvas, @@ -140,18 +139,18 @@ import { AtlasCmptConnModule } from "src/atlasComponents/connectivity"; /** * from */ - x * dpr, - y * dpr, - width * dpr, - height * dpr, + x, + y, + width, + height, /** * to */ 0, 0, - width * dpr, - height * dpr + width, + height ) subCanvas.toBlob(blob => {