Fix scaling of text objects (#2767)

* Fix scaling of text objects

* Do not transform scale factors
This commit is contained in:
Abdo 2023-10-25 01:47:54 +03:00 committed by GitHub
parent ecb12e44e1
commit 0736cdb29c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,6 @@ import type { ConstructorParams, Size } from "../types";
import type { ShapeDataForCloze } from "./base";
import { Shape } from "./base";
import { floatToDisplay } from "./floats";
import { xFromNormalized, xToNormalized, yFromNormalized, yToNormalized } from "./position";
export class Text extends Shape {
text: string;
@ -50,8 +49,6 @@ export class Text extends Shape {
return new Text({
...this,
...super.normalPosition(size),
scaleX: xToNormalized(size, this.scaleX),
scaleY: yToNormalized(size, this.scaleY),
});
}
@ -59,8 +56,6 @@ export class Text extends Shape {
return new Text({
...this,
...super.absolutePosition(size),
scaleX: xFromNormalized(size, this.scaleX),
scaleY: yFromNormalized(size, this.scaleY),
});
}
}