@galacean/effects-plugin-rich-text 2.8.2 → 2.8.4

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 player rich text plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 云垣
6
- * Version: v2.8.2
6
+ * Version: v2.8.4
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -413,11 +413,10 @@ var RichTextLayout = /*#__PURE__*/ function() {
413
413
  this.width = size ? size[0] : 100;
414
414
  this.height = size ? size[1] : 100;
415
415
  this.wrapEnabled = wrapEnabled;
416
- // 兜底,避免 0/负数/NaN/Infinity
417
- var safeMaxW = Number.isFinite(maxTextWidth) ? maxTextWidth : 0;
418
- var safeMaxH = Number.isFinite(maxTextHeight) ? maxTextHeight : 0;
419
- this.maxTextWidth = Math.max(1, safeMaxW);
420
- this.maxTextHeight = Math.max(1, safeMaxH);
416
+ // TODO: 统一富文本和图层 size 单位,这边先临时做个转换
417
+ var scaleFactor = 50;
418
+ this.maxTextWidth = maxTextWidth * scaleFactor;
419
+ this.maxTextHeight = maxTextHeight * scaleFactor;
421
420
  this.sizeMode = sizeMode;
422
421
  }
423
422
  var _proto = RichTextLayout.prototype;
@@ -1724,7 +1723,7 @@ applyMixins(RichTextComponent, [
1724
1723
 
1725
1724
  /**
1726
1725
  * 插件版本号
1727
- */ var version = "2.8.2";
1726
+ */ var version = "2.8.4";
1728
1727
  registerPlugin("rich-text", RichTextLoader);
1729
1728
  logger.info("Plugin rich text version: " + version + ".");
1730
1729
  if (version !== EFFECTS.version) {