Skip to content

Commit b1abda6

Browse files
committed
Fix incorrect text scaling when it is rotated
1 parent 7a05c9a commit b1abda6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

InteractiveHtmlBom/ibom.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@
266266
ctx.save();
267267
ctx.translate(...text.pos.map(c => c * scalefactor));
268268
angle = -text.angle;
269-
ctx.scale(text.width, text.height);
270269
if (flip) {
271270
ctx.scale(-1, 1);
272271
angle = -angle;
273272
}
274273
txt = text.text.split("\n")
275274
ctx.rotate(deg2rad(angle));
275+
ctx.scale(text.width, text.height);
276276
ctx.fillStyle = color;
277277
switch (text.horiz_justify) {
278278
case -1:

0 commit comments

Comments
 (0)