From 0736cdb29c62e02c42a3c96c006e68ea7ffb36b8 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 25 Oct 2023 01:47:54 +0300 Subject: [PATCH] Fix scaling of text objects (#2767) * Fix scaling of text objects * Do not transform scale factors --- ts/image-occlusion/shapes/text.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ts/image-occlusion/shapes/text.ts b/ts/image-occlusion/shapes/text.ts index 743aeff62..329dc0825 100644 --- a/ts/image-occlusion/shapes/text.ts +++ b/ts/image-occlusion/shapes/text.ts @@ -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), }); } }