Skip to content

Commit 267afe1

Browse files
author
farfromrefug
committed
fix(svg): ios fix for SGV.drawOnCanvas with stretch="aspectFit"
1 parent d9f64c7 commit 267afe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui-svg/canvas.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class SVG extends SVGBase {
6464
}
6565
const xOrigin = (width - paintedWidth) / 2.0;
6666
const yOrigin = (height - paintedHeight) / 2.0;
67-
return { px: 0, py: yOrigin, sx: paintedWidth / nativeWidth, sy: paintedHeight / nativeHeight };
67+
return { px: xOrigin, py: yOrigin, sx: paintedWidth / nativeWidth, sy: paintedHeight / nativeHeight };
6868
} else if (myGravity === 'aspectFill') {
6969
if (nativeAspectRatio <= boundedAspectRatio) {
7070
paintedHeight = paintedWidth / nativeAspectRatio;

0 commit comments

Comments
 (0)