diff --git a/app/src/components/SVGContent.vue b/app/src/components/SVGContent.vue index 5311ad6..36ef845 100644 --- a/app/src/components/SVGContent.vue +++ b/app/src/components/SVGContent.vue @@ -55,7 +55,7 @@ export default defineComponent({ const transform = pz.getTransform(); const currentRatio = svg.clientWidth * transform.scale / svg.viewBox.baseVal.width; const ratio = svg.clientWidth / svg.viewBox.baseVal.width; - const targetScale = anchor.width.baseVal.value * ratio / window.innerWidth; + const targetScale = window.innerWidth / (anchor.width.baseVal.value * ratio); const svgTargetX = anchor.x.baseVal.value + anchor.width.baseVal.value / 2; const svgTargetY = anchor.y.baseVal.value + anchor.height.baseVal.value / 2;