@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.js 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
  'use strict';
@@ -436,11 +436,10 @@ var RichTextLayout = /*#__PURE__*/ function() {
436
436
  this.width = size ? size[0] : 100;
437
437
  this.height = size ? size[1] : 100;
438
438
  this.wrapEnabled = wrapEnabled;
439
- // 兜底,避免 0/负数/NaN/Infinity
440
- var safeMaxW = Number.isFinite(maxTextWidth) ? maxTextWidth : 0;
441
- var safeMaxH = Number.isFinite(maxTextHeight) ? maxTextHeight : 0;
442
- this.maxTextWidth = Math.max(1, safeMaxW);
443
- this.maxTextHeight = Math.max(1, safeMaxH);
439
+ // TODO: 统一富文本和图层 size 单位,这边先临时做个转换
440
+ var scaleFactor = 50;
441
+ this.maxTextWidth = maxTextWidth * scaleFactor;
442
+ this.maxTextHeight = maxTextHeight * scaleFactor;
444
443
  this.sizeMode = sizeMode;
445
444
  }
446
445
  var _proto = RichTextLayout.prototype;
@@ -1747,7 +1746,7 @@ EFFECTS.applyMixins(exports.RichTextComponent, [
1747
1746
 
1748
1747
  /**
1749
1748
  * 插件版本号
1750
- */ var version = "2.8.2";
1749
+ */ var version = "2.8.4";
1751
1750
  EFFECTS.registerPlugin("rich-text", RichTextLoader);
1752
1751
  EFFECTS.logger.info("Plugin rich text version: " + version + ".");
1753
1752
  if (version !== EFFECTS__namespace.version) {