@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.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.9.0-alpha.
|
|
6
|
+
* Version: v2.9.0-alpha.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -426,7 +426,7 @@ var RichTextLayout = /*#__PURE__*/ function() {
|
|
|
426
426
|
// TODO: width 和 height 新版富文本计算没有地方用到
|
|
427
427
|
this.width = 0;
|
|
428
428
|
this.height = 0;
|
|
429
|
-
var
|
|
429
|
+
var _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? EFFECTS.spec.TextOverflow.clip : _options_textOverflow, _options_textVerticalAlign = options.textVerticalAlign, textVerticalAlign = _options_textVerticalAlign === void 0 ? EFFECTS.spec.TextVerticalAlign.middle : _options_textVerticalAlign, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? EFFECTS.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 ? EFFECTS.spec.TextSizeMode.autoWidth : _options_autoResize, _options_useLegacyRichText = options.// @ts-expect-error 兼容旧版
|
|
430
430
|
useLegacyRichText, useLegacyRichText = _options_useLegacyRichText === void 0 ? false : _options_useLegacyRichText;
|
|
431
431
|
this.letterSpace = letterSpace;
|
|
432
432
|
this.lineHeight = lineHeight;
|
|
@@ -434,8 +434,8 @@ var RichTextLayout = /*#__PURE__*/ function() {
|
|
|
434
434
|
this.overflow = textOverflow;
|
|
435
435
|
this.textVerticalAlign = textVerticalAlign;
|
|
436
436
|
this.textAlign = textAlign;
|
|
437
|
-
this.width =
|
|
438
|
-
this.height =
|
|
437
|
+
this.width = 100;
|
|
438
|
+
this.height = 100;
|
|
439
439
|
this.wrapEnabled = wrapEnabled;
|
|
440
440
|
this.maxTextWidth = maxTextWidth;
|
|
441
441
|
this.maxTextHeight = maxTextHeight;
|
|
@@ -1447,6 +1447,7 @@ exports.RichTextComponent = /*#__PURE__*/ function(MaskableGraphic) {
|
|
|
1447
1447
|
if (!this.isDirty || !this.context || !this.canvas) {
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
|
+
this.updateStrategies();
|
|
1450
1451
|
// 解析富文本
|
|
1451
1452
|
this.generateTextProgram(this.text);
|
|
1452
1453
|
var layout = this.textLayout;
|
|
@@ -1605,7 +1606,7 @@ EFFECTS.applyMixins(exports.RichTextComponent, [
|
|
|
1605
1606
|
|
|
1606
1607
|
/**
|
|
1607
1608
|
* 插件版本号
|
|
1608
|
-
*/ var version = "2.9.0-alpha.
|
|
1609
|
+
*/ var version = "2.9.0-alpha.2";
|
|
1609
1610
|
EFFECTS.registerPlugin("rich-text", RichTextLoader);
|
|
1610
1611
|
EFFECTS.logger.info("Plugin rich text version: " + version + ".");
|
|
1611
1612
|
if (version !== EFFECTS__namespace.version) {
|