@lvce-editor/renderer-process 2.1.0 → 2.1.1

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.
@@ -2471,16 +2471,20 @@ const MeasureTextHeight_ipc = {
2471
2471
  name: name$j
2472
2472
  };
2473
2473
 
2474
- const measureTextBlockHeight = (text, fontSize, fontFamily, width) => {
2474
+ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) => {
2475
2475
  string(text);
2476
- string(fontSize);
2476
+ number(fontSize);
2477
2477
  string(fontFamily);
2478
+ number(width);
2479
+ string(lineHeight);
2478
2480
  const $Measure = document.createElement('div');
2479
2481
  $Measure.style.width = `${width}px`;
2480
2482
  $Measure.style.contain = 'content';
2481
2483
  $Measure.style.position = 'absolute';
2482
2484
  $Measure.style.top = '-9999px';
2483
2485
  $Measure.style.left = '-9999px';
2486
+ $Measure.style.fontSize = `${fontSize}px`;
2487
+ $Measure.style.lineHeight = lineHeight;
2484
2488
  $Measure.textContent = text;
2485
2489
  return getElementHeight($Measure);
2486
2490
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "",
5
5
  "main": "dist/diffWorkerMain.js",
6
6
  "type": "module",