mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Fix scaling of text objects (#2767)
* Fix scaling of text objects * Do not transform scale factors
This commit is contained in:
parent
ecb12e44e1
commit
0736cdb29c
1 changed files with 0 additions and 5 deletions
|
@ -8,7 +8,6 @@ import type { ConstructorParams, Size } from "../types";
|
||||||
import type { ShapeDataForCloze } from "./base";
|
import type { ShapeDataForCloze } from "./base";
|
||||||
import { Shape } from "./base";
|
import { Shape } from "./base";
|
||||||
import { floatToDisplay } from "./floats";
|
import { floatToDisplay } from "./floats";
|
||||||
import { xFromNormalized, xToNormalized, yFromNormalized, yToNormalized } from "./position";
|
|
||||||
|
|
||||||
export class Text extends Shape {
|
export class Text extends Shape {
|
||||||
text: string;
|
text: string;
|
||||||
|
@ -50,8 +49,6 @@ export class Text extends Shape {
|
||||||
return new Text({
|
return new Text({
|
||||||
...this,
|
...this,
|
||||||
...super.normalPosition(size),
|
...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({
|
return new Text({
|
||||||
...this,
|
...this,
|
||||||
...super.absolutePosition(size),
|
...super.absolutePosition(size),
|
||||||
scaleX: xFromNormalized(size, this.scaleX),
|
|
||||||
scaleY: yFromNormalized(size, this.scaleY),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue