@lvce-editor/renderer-process 30.82.1 → 30.82.2
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.
|
@@ -11278,6 +11278,7 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
11278
11278
|
string(lineHeight);
|
|
11279
11279
|
const $Measure = document.createElement('textarea');
|
|
11280
11280
|
$Measure.style.width = `${width}px`;
|
|
11281
|
+
$Measure.style.boxSizing = 'border-box';
|
|
11281
11282
|
$Measure.style.contain = 'content';
|
|
11282
11283
|
// @ts-ignore
|
|
11283
11284
|
$Measure.style.fieldSizing = 'content';
|
|
@@ -11285,7 +11286,11 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
11285
11286
|
$Measure.style.top = '-9999px';
|
|
11286
11287
|
$Measure.style.left = '-9999px';
|
|
11287
11288
|
$Measure.style.fontSize = `${fontSize}px`;
|
|
11289
|
+
$Measure.style.fontFamily = fontFamily;
|
|
11288
11290
|
$Measure.style.lineHeight = lineHeight;
|
|
11291
|
+
$Measure.style.margin = '0';
|
|
11292
|
+
$Measure.style.padding = '0';
|
|
11293
|
+
$Measure.style.border = '0';
|
|
11289
11294
|
$Measure.value = text;
|
|
11290
11295
|
$Measure.name = 'measureTextBlockHeight';
|
|
11291
11296
|
const height = getElementHeight($Measure);
|