@lvce-editor/renderer-process 21.12.0 → 21.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2908,12 +2908,15 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
2908
2908
|
const $Measure = document.createElement('textarea');
|
|
2909
2909
|
$Measure.style.width = `${width}px`;
|
|
2910
2910
|
$Measure.style.contain = 'content';
|
|
2911
|
+
// @ts-ignore
|
|
2912
|
+
$Measure.style.fieldSizing = 'content';
|
|
2911
2913
|
$Measure.style.position = 'absolute';
|
|
2912
2914
|
$Measure.style.top = '-9999px';
|
|
2913
2915
|
$Measure.style.left = '-9999px';
|
|
2914
2916
|
$Measure.style.fontSize = `${fontSize}px`;
|
|
2915
2917
|
$Measure.style.lineHeight = lineHeight;
|
|
2916
2918
|
$Measure.value = text;
|
|
2919
|
+
$Measure.name = 'measureTextBlockHeight';
|
|
2917
2920
|
const height = getElementHeight($Measure);
|
|
2918
2921
|
return height;
|
|
2919
2922
|
};
|