@galacean/effects-core 1.2.1 → 1.2.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.
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v1.2.1
6
+ * Version: v1.2.2
7
7
  */
8
8
 
9
9
  /******************************************************************************
@@ -19968,9 +19968,10 @@ var TextItem = /** @class */ (function (_super) {
19968
19968
  if (this.textStyle.fontSize === value) {
19969
19969
  return;
19970
19970
  }
19971
+ // 保证字号变化后位置正常
19972
+ var diff = this.textStyle.fontSize - value;
19973
+ this.textLayout.lineHeight += diff;
19971
19974
  this.textStyle.fontSize = value;
19972
- // 1.5175 = 31.43 / 20
19973
- this.textLayout.lineHeight = this.textStyle.fontSize * 1.5175;
19974
19975
  this.isDirty = true;
19975
19976
  };
19976
19977
  /**