|
@@ -46,8 +46,8 @@ import {
|
|
getBoundTextMaxWidth,
|
|
getBoundTextMaxWidth,
|
|
} from "./textElement";
|
|
} from "./textElement";
|
|
import {
|
|
import {
|
|
- getApproxMinLineHeight,
|
|
|
|
- getApproxMinLineWidth,
|
|
|
|
|
|
+ getApproxMinContainerHeight,
|
|
|
|
+ getApproxMinContainerWidth,
|
|
} from "./textMeasurements";
|
|
} from "./textMeasurements";
|
|
export const normalizeAngle = (angle: number): number => {
|
|
export const normalizeAngle = (angle: number): number => {
|
|
if (angle >= 2 * Math.PI) {
|
|
if (angle >= 2 * Math.PI) {
|
|
@@ -429,11 +429,11 @@ export const resizeSingleElement = (
|
|
}
|
|
}
|
|
boundTextFontSize = nextFontSize;
|
|
boundTextFontSize = nextFontSize;
|
|
} else {
|
|
} else {
|
|
- const minWidth = getApproxMinLineWidth(
|
|
|
|
|
|
+ const minWidth = getApproxMinContainerWidth(
|
|
getFontString(boundTextElement),
|
|
getFontString(boundTextElement),
|
|
boundTextElement.lineHeight,
|
|
boundTextElement.lineHeight,
|
|
);
|
|
);
|
|
- const minHeight = getApproxMinLineHeight(
|
|
|
|
|
|
+ const minHeight = getApproxMinContainerHeight(
|
|
boundTextElement.fontSize,
|
|
boundTextElement.fontSize,
|
|
boundTextElement.lineHeight,
|
|
boundTextElement.lineHeight,
|
|
);
|
|
);
|