@galacean/effects-plugin-rich-text 2.9.0-alpha.0 → 2.9.0-alpha.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/alipay.js +1 -1
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +1 -1
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +1 -1
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +1 -1
- package/dist/douyin.mjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/weapp.js +1 -1
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +1 -1
- package/dist/weapp.mjs.map +1 -1
- package/package.json +2 -2
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.9.0-alpha.
|
|
6
|
+
* Version: v2.9.0-alpha.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -403,7 +403,7 @@ var RichTextLayout = /*#__PURE__*/ function() {
|
|
|
403
403
|
// TODO: width 和 height 新版富文本计算没有地方用到
|
|
404
404
|
this.width = 0;
|
|
405
405
|
this.height = 0;
|
|
406
|
-
var
|
|
406
|
+
var _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? spec.TextOverflow.clip : _options_textOverflow, _options_textVerticalAlign = options.textVerticalAlign, textVerticalAlign = _options_textVerticalAlign === void 0 ? spec.TextVerticalAlign.middle : _options_textVerticalAlign, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? spec.TextAlignment.left : _options_textAlign, _options_letterSpace = options.letterSpace, letterSpace = _options_letterSpace === void 0 ? 0 : _options_letterSpace, _options_lineHeight = options.lineHeight, lineHeight = _options_lineHeight === void 0 ? 0.571 : _options_lineHeight, _options_wrapEnabled = options.wrapEnabled, wrapEnabled = _options_wrapEnabled === void 0 ? false : _options_wrapEnabled, _options_maxTextWidth = options.maxTextWidth, maxTextWidth = _options_maxTextWidth === void 0 ? 350 : _options_maxTextWidth, _options_maxTextHeight = options.maxTextHeight, maxTextHeight = _options_maxTextHeight === void 0 ? 1000 : _options_maxTextHeight, _options_autoResize = options.autoResize, autoResize = _options_autoResize === void 0 ? spec.TextSizeMode.autoWidth : _options_autoResize, _options_useLegacyRichText = options.// @ts-expect-error 兼容旧版
|
|
407
407
|
useLegacyRichText, useLegacyRichText = _options_useLegacyRichText === void 0 ? false : _options_useLegacyRichText;
|
|
408
408
|
this.letterSpace = letterSpace;
|
|
409
409
|
this.lineHeight = lineHeight;
|
|
@@ -411,8 +411,8 @@ var RichTextLayout = /*#__PURE__*/ function() {
|
|
|
411
411
|
this.overflow = textOverflow;
|
|
412
412
|
this.textVerticalAlign = textVerticalAlign;
|
|
413
413
|
this.textAlign = textAlign;
|
|
414
|
-
this.width =
|
|
415
|
-
this.height =
|
|
414
|
+
this.width = 100;
|
|
415
|
+
this.height = 100;
|
|
416
416
|
this.wrapEnabled = wrapEnabled;
|
|
417
417
|
this.maxTextWidth = maxTextWidth;
|
|
418
418
|
this.maxTextHeight = maxTextHeight;
|
|
@@ -1424,6 +1424,7 @@ var RichTextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
1424
1424
|
if (!this.isDirty || !this.context || !this.canvas) {
|
|
1425
1425
|
return;
|
|
1426
1426
|
}
|
|
1427
|
+
this.updateStrategies();
|
|
1427
1428
|
// 解析富文本
|
|
1428
1429
|
this.generateTextProgram(this.text);
|
|
1429
1430
|
var layout = this.textLayout;
|
|
@@ -1582,7 +1583,7 @@ applyMixins(RichTextComponent, [
|
|
|
1582
1583
|
|
|
1583
1584
|
/**
|
|
1584
1585
|
* 插件版本号
|
|
1585
|
-
*/ var version = "2.9.0-alpha.
|
|
1586
|
+
*/ var version = "2.9.0-alpha.2";
|
|
1586
1587
|
registerPlugin("rich-text", RichTextLoader);
|
|
1587
1588
|
logger.info("Plugin rich text version: " + version + ".");
|
|
1588
1589
|
if (version !== EFFECTS.version) {
|