@visactor/vrender 0.16.14-alpha.5 → 0.16.14-alpha.6

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/cjs/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const version = "0.16.14-alpha.5";
1
+ export declare const version = "0.16.14-alpha.6";
2
2
  export * from '@visactor/vrender-core';
3
3
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,5 +21,5 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.16.14-alpha.5", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
24
+ exports.version = "0.16.14-alpha.6", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
25
25
  __exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.14-alpha.5\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.14-alpha.6\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.js CHANGED
@@ -4591,13 +4591,9 @@
4591
4591
  _this$_userSpec$textB = _this$_userSpec.textBaseline,
4592
4592
  textBaseline = _this$_userSpec$textB === void 0 ? null != baseline ? baseline : "middle" : _this$_userSpec$textB,
4593
4593
  ellipsis = _this$_userSpec.ellipsis,
4594
- limit = _this$_userSpec.limit;
4595
- var _this$_userSpec$lineH = this._userSpec.lineHeight,
4594
+ limit = _this$_userSpec.limit,
4595
+ _this$_userSpec$lineH = _this$_userSpec.lineHeight,
4596
4596
  lineHeight = _this$_userSpec$lineH === void 0 ? fontSize : _this$_userSpec$lineH;
4597
- if (isString$1(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
4598
- var scale = Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100;
4599
- lineHeight = fontSize * scale;
4600
- }
4601
4597
  return {
4602
4598
  fontStyle: fontStyle,
4603
4599
  fontVariant: fontVariant,
@@ -4673,7 +4669,6 @@
4673
4669
  }, {
4674
4670
  key: "_measureWithNaiveCanvas",
4675
4671
  value: function _measureWithNaiveCanvas(text) {
4676
- var _a;
4677
4672
  if (!this.initContext()) return this._quickMeasureWithoutCanvas(text);
4678
4673
  var metrics = this._context.measureText(text),
4679
4674
  _this$textSpec2 = this.textSpec,
@@ -4681,7 +4676,7 @@
4681
4676
  lineHeight = _this$textSpec2.lineHeight;
4682
4677
  return {
4683
4678
  width: metrics.width,
4684
- height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize
4679
+ height: null != lineHeight ? lineHeight : fontSize
4685
4680
  };
4686
4681
  }
4687
4682
  }, {
@@ -4711,7 +4706,6 @@
4711
4706
  }, {
4712
4707
  key: "_quickMeasureWithoutCanvas",
4713
4708
  value: function _quickMeasureWithoutCanvas(text) {
4714
- var _a;
4715
4709
  var totalSize = {
4716
4710
  width: 0,
4717
4711
  height: 0
@@ -4724,12 +4718,11 @@
4724
4718
  size = ["F", "W"].includes(eastAsianCharacterInfo(_char2)) ? 1 : .53;
4725
4719
  totalSize.width += size * fontSize;
4726
4720
  }
4727
- return totalSize.height = null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize, totalSize;
4721
+ return totalSize.height = null != lineHeight ? lineHeight : fontSize, totalSize;
4728
4722
  }
4729
4723
  }, {
4730
4724
  key: "_measureReduce",
4731
4725
  value: function _measureReduce(text, processor) {
4732
- var _a;
4733
4726
  var _this$textSpec4 = this.textSpec,
4734
4727
  fontSize = _this$textSpec4.fontSize,
4735
4728
  lineHeight = _this$textSpec4.lineHeight,
@@ -4746,7 +4739,7 @@
4746
4739
  width: textArr.reduce(function (maxWidth, cur) {
4747
4740
  return Math.max(maxWidth, processor(cur).width);
4748
4741
  }, 0),
4749
- height: textArr.length * ((null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize) + 1) + 1
4742
+ height: textArr.length * ((null != lineHeight ? lineHeight : fontSize) + 1) + 1
4750
4743
  };
4751
4744
  }
4752
4745
  return processor(text.toString());
@@ -6292,10 +6285,7 @@
6292
6285
  direction: "horizontal",
6293
6286
  wordBreak: "break-all",
6294
6287
  ignoreBuf: !1,
6295
- verticalMode: 0,
6296
- whiteSpace: "no-wrap",
6297
- heightLimit: 1 / 0,
6298
- lineClamp: 1 / 0
6288
+ verticalMode: 0
6299
6289
  };
6300
6290
  var DefaultStyle = Object.assign(Object.assign(Object.assign({
6301
6291
  opacity: 1,
@@ -9954,12 +9944,6 @@
9954
9944
  }();
9955
9945
  RafBasedSTO.TimeOut = 1e3 / 60;
9956
9946
  var rafBasedSto = new RafBasedSTO();
9957
- var calculateLineHeight = function calculateLineHeight(lineHeight, fontSize) {
9958
- if (isString$1(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
9959
- return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
9960
- }
9961
- return lineHeight;
9962
- };
9963
9947
 
9964
9948
  var IncreaseCount = /*#__PURE__*/function (_ACustomAnimate) {
9965
9949
  _inherits(IncreaseCount, _ACustomAnimate);
@@ -14496,7 +14480,7 @@
14496
14480
  return CanvasTextLayout;
14497
14481
  }();
14498
14482
 
14499
- var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
14483
+ var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
14500
14484
  var Text = /*#__PURE__*/function (_Graphic) {
14501
14485
  _inherits(Text, _Graphic);
14502
14486
  var _super = _createSuper(Text);
@@ -14570,117 +14554,6 @@
14570
14554
  paddingArray = parsePadding(boundsPadding);
14571
14555
  return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
14572
14556
  }
14573
- }, {
14574
- key: "updateWrapAABBBounds",
14575
- value: function updateWrapAABBBounds(text) {
14576
- var _a, _b, _c, _d;
14577
- var textTheme = getTheme(this).text,
14578
- _this$attribute = this.attribute,
14579
- _this$attribute$fontF = _this$attribute.fontFamily,
14580
- fontFamily = _this$attribute$fontF === void 0 ? textTheme.fontFamily : _this$attribute$fontF,
14581
- _this$attribute$textA = _this$attribute.textAlign,
14582
- textAlign = _this$attribute$textA === void 0 ? textTheme.textAlign : _this$attribute$textA,
14583
- _this$attribute$textB = _this$attribute.textBaseline,
14584
- textBaseline = _this$attribute$textB === void 0 ? textTheme.textBaseline : _this$attribute$textB,
14585
- _this$attribute$fontS = _this$attribute.fontSize,
14586
- fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
14587
- _this$attribute$ellip = _this$attribute.ellipsis,
14588
- ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
14589
- maxLineWidth = _this$attribute.maxLineWidth,
14590
- _this$attribute$strok = _this$attribute.stroke,
14591
- stroke = _this$attribute$strok === void 0 ? textTheme.stroke : _this$attribute$strok,
14592
- _this$attribute$lineW = _this$attribute.lineWidth,
14593
- lineWidth = _this$attribute$lineW === void 0 ? textTheme.lineWidth : _this$attribute$lineW,
14594
- _this$attribute$wordB = _this$attribute.wordBreak,
14595
- wordBreak = _this$attribute$wordB === void 0 ? textTheme.wordBreak : _this$attribute$wordB,
14596
- _this$attribute$fontW = _this$attribute.fontWeight,
14597
- fontWeight = _this$attribute$fontW === void 0 ? textTheme.fontWeight : _this$attribute$fontW,
14598
- _this$attribute$ignor = _this$attribute.ignoreBuf,
14599
- ignoreBuf = _this$attribute$ignor === void 0 ? textTheme.ignoreBuf : _this$attribute$ignor,
14600
- _this$attribute$heigh = _this$attribute.heightLimit,
14601
- heightLimit = _this$attribute$heigh === void 0 ? 0 : _this$attribute$heigh,
14602
- lineClamp = _this$attribute.lineClamp,
14603
- lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
14604
- buf = ignoreBuf ? 0 : 2;
14605
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
14606
- var _bbox = this.cache.layoutData.bbox;
14607
- return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14608
- }
14609
- var textMeasure = application.graphicUtil.textMeasure,
14610
- layoutObj = new CanvasTextLayout(fontFamily, {
14611
- fontSize: fontSize,
14612
- fontWeight: fontWeight,
14613
- fontFamily: fontFamily
14614
- }, textMeasure),
14615
- lines = isArray$1(text) ? text.map(function (l) {
14616
- return l.toString();
14617
- }) : [text.toString()],
14618
- linesLayout = [],
14619
- bboxWH = [0, 0];
14620
- var lineCountLimit = 1 / 0;
14621
- if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
14622
- if (maxLineWidth > 0) for (var i = 0; i < lines.length; i++) {
14623
- var str = lines[i];
14624
- var needCut = !0;
14625
- if (i === lineCountLimit - 1) {
14626
- var _clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
14627
- linesLayout.push({
14628
- str: _clip.str,
14629
- width: _clip.width
14630
- });
14631
- break;
14632
- }
14633
- var clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
14634
- if ("" !== str && "" === clip.str) {
14635
- if (ellipsis) {
14636
- var clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
14637
- clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
14638
- } else clip.str = "", clip.width = 0;
14639
- needCut = !1;
14640
- }
14641
- if (linesLayout.push({
14642
- str: clip.str,
14643
- width: clip.width
14644
- }), clip.str.length === str.length) ;else if (needCut) {
14645
- var newStr = str.substring(clip.str.length);
14646
- lines.splice(i + 1, 0, newStr);
14647
- }
14648
- }
14649
- var maxWidth = 0;
14650
- linesLayout.forEach(function (layout) {
14651
- maxWidth = Math.max(maxWidth, layout.width);
14652
- }), bboxWH[0] = maxWidth;
14653
- } else {
14654
- var width,
14655
- _text,
14656
- _lineWidth = 0;
14657
- for (var _i = 0, len = lines.length; _i < len; _i++) {
14658
- if (_i === lineCountLimit - 1) {
14659
- var _clip2 = layoutObj.textMeasure.clipTextWithSuffix(lines[_i], layoutObj.textOptions, maxLineWidth, ellipsis, !1);
14660
- linesLayout.push({
14661
- str: _clip2.str,
14662
- width: _clip2.width
14663
- }), _lineWidth = Math.max(_lineWidth, _clip2.width);
14664
- break;
14665
- }
14666
- _text = lines[_i], width = layoutObj.textMeasure.measureTextWidth(_text, layoutObj.textOptions, "break-word" === wordBreak), _lineWidth = Math.max(_lineWidth, width), linesLayout.push({
14667
- str: _text,
14668
- width: width
14669
- });
14670
- }
14671
- bboxWH[0] = _lineWidth;
14672
- }
14673
- bboxWH[1] = linesLayout.length * (lineHeight + buf);
14674
- var bbox = {
14675
- xOffset: 0,
14676
- yOffset: 0,
14677
- width: bboxWH[0],
14678
- height: bboxWH[1]
14679
- };
14680
- layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
14681
- var layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
14682
- return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14683
- }
14684
14557
  }, {
14685
14558
  key: "updateSingallineAABBBounds",
14686
14559
  value: function updateSingallineAABBBounds(text) {
@@ -14727,12 +14600,9 @@
14727
14600
  _attribute$wordBreak === void 0 ? textTheme.wordBreak : _attribute$wordBreak;
14728
14601
  var _attribute$ignoreBuf = attribute.ignoreBuf,
14729
14602
  ignoreBuf = _attribute$ignoreBuf === void 0 ? textTheme.ignoreBuf : _attribute$ignoreBuf,
14730
- _attribute$whiteSpace = attribute.whiteSpace,
14731
- whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace;
14732
- if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
14733
- var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
14734
- textFontSize = attribute.fontSize || textTheme.fontSize,
14735
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, textFontSize)) && void 0 !== _a ? _a : textFontSize + buf;
14603
+ buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
14604
+ _attribute$lineHeight = attribute.lineHeight,
14605
+ lineHeight = _attribute$lineHeight === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight;
14736
14606
  if (!this.shouldUpdateShape() && this.cache) {
14737
14607
  width = null !== (_b = this.cache.clipedWidth) && void 0 !== _b ? _b : 0;
14738
14608
  var _dx = textDrawOffsetX(textAlign, width),
@@ -14802,11 +14672,12 @@
14802
14672
  fontFamily = _attribute$fontFamily2 === void 0 ? textTheme.fontFamily : _attribute$fontFamily2,
14803
14673
  _attribute$stroke2 = attribute.stroke,
14804
14674
  stroke = _attribute$stroke2 === void 0 ? textTheme.stroke : _attribute$stroke2,
14675
+ _attribute$lineHeight2 = attribute.lineHeight,
14676
+ lineHeight = _attribute$lineHeight2 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight2,
14805
14677
  _attribute$lineWidth2 = attribute.lineWidth,
14806
14678
  lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
14807
14679
  _attribute$verticalMo = attribute.verticalMode,
14808
- verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo,
14809
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
14680
+ verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo;
14810
14681
  var _attribute$textAlign2 = attribute.textAlign,
14811
14682
  textAlign = _attribute$textAlign2 === void 0 ? textTheme.textAlign : _attribute$textAlign2,
14812
14683
  _attribute$textBaseli2 = attribute.textBaseline,
@@ -14856,7 +14727,7 @@
14856
14727
  }, {
14857
14728
  key: "updateHorizontalMultilineAABBBounds",
14858
14729
  value: function updateHorizontalMultilineAABBBounds(text) {
14859
- var _a, _b;
14730
+ var _a;
14860
14731
  var textTheme = getTheme(this).text,
14861
14732
  attribute = this.attribute,
14862
14733
  _attribute$fontFamily3 = attribute.fontFamily,
@@ -14869,6 +14740,8 @@
14869
14740
  fontSize = _attribute$fontSize3 === void 0 ? textTheme.fontSize : _attribute$fontSize3,
14870
14741
  _attribute$fontWeight3 = attribute.fontWeight,
14871
14742
  fontWeight = _attribute$fontWeight3 === void 0 ? textTheme.fontWeight : _attribute$fontWeight3,
14743
+ _attribute$lineHeight3 = attribute.lineHeight,
14744
+ lineHeight = _attribute$lineHeight3 === void 0 ? attribute.lineHeight || attribute.fontSize || textTheme.fontSize : _attribute$lineHeight3,
14872
14745
  _attribute$ellipsis3 = attribute.ellipsis,
14873
14746
  ellipsis = _attribute$ellipsis3 === void 0 ? textTheme.ellipsis : _attribute$ellipsis3,
14874
14747
  maxLineWidth = attribute.maxLineWidth,
@@ -14876,13 +14749,11 @@
14876
14749
  stroke = _attribute$stroke3 === void 0 ? textTheme.stroke : _attribute$stroke3,
14877
14750
  _attribute$lineWidth3 = attribute.lineWidth,
14878
14751
  lineWidth = _attribute$lineWidth3 === void 0 ? textTheme.lineWidth : _attribute$lineWidth3,
14879
- _attribute$whiteSpace2 = attribute.whiteSpace,
14880
- whiteSpace = _attribute$whiteSpace2 === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace2,
14881
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
14882
- if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
14883
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
14884
- var _bbox2 = this.cache.layoutData.bbox;
14885
- return this._AABBBounds.set(_bbox2.xOffset, _bbox2.yOffset, _bbox2.xOffset + _bbox2.width, _bbox2.yOffset + _bbox2.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14752
+ _attribute$wordBreak2 = attribute.wordBreak;
14753
+ _attribute$wordBreak2 === void 0 ? textTheme.wordBreak : _attribute$wordBreak2;
14754
+ if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
14755
+ var _bbox = this.cache.layoutData.bbox;
14756
+ return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
14886
14757
  }
14887
14758
  var textMeasure = application.graphicUtil.textMeasure,
14888
14759
  layoutData = new CanvasTextLayout(fontFamily, {
@@ -14916,11 +14787,12 @@
14916
14787
  fontWeight = _attribute$fontWeight4 === void 0 ? textTheme.fontWeight : _attribute$fontWeight4,
14917
14788
  _attribute$stroke4 = attribute.stroke,
14918
14789
  stroke = _attribute$stroke4 === void 0 ? textTheme.stroke : _attribute$stroke4,
14790
+ _attribute$lineHeight4 = attribute.lineHeight,
14791
+ lineHeight = _attribute$lineHeight4 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight4,
14919
14792
  _attribute$lineWidth4 = attribute.lineWidth,
14920
14793
  lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
14921
14794
  _attribute$verticalMo2 = attribute.verticalMode,
14922
- verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2,
14923
- lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
14795
+ verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2;
14924
14796
  var _attribute$textAlign4 = attribute.textAlign,
14925
14797
  textAlign = _attribute$textAlign4 === void 0 ? textTheme.textAlign : _attribute$textAlign4,
14926
14798
  _attribute$textBaseli4 = attribute.textBaseline,
@@ -15053,7 +14925,7 @@
15053
14925
  }, {
15054
14926
  key: "updateMultilineAABBBounds",
15055
14927
  value: function updateMultilineAABBBounds(text) {
15056
- var _a, _b, _c, _d;
14928
+ var _a, _b, _c;
15057
14929
  var textTheme = getTheme(this).text,
15058
14930
  _this$attribute = this.attribute,
15059
14931
  _this$attribute$fontF = _this$attribute.fontFamily,
@@ -15064,6 +14936,8 @@
15064
14936
  textBaseline = _this$attribute$textB === void 0 ? textTheme.textBaseline : _this$attribute$textB,
15065
14937
  _this$attribute$fontS = _this$attribute.fontSize,
15066
14938
  fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
14939
+ _this$attribute$lineH = _this$attribute.lineHeight,
14940
+ lineHeight = _this$attribute$lineH === void 0 ? this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize : _this$attribute$lineH,
15067
14941
  _this$attribute$ellip = _this$attribute.ellipsis,
15068
14942
  ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
15069
14943
  maxLineWidth = _this$attribute.maxLineWidth,
@@ -15080,9 +14954,8 @@
15080
14954
  _this$attribute$heigh = _this$attribute.heightLimit,
15081
14955
  heightLimit = _this$attribute$heigh === void 0 ? 0 : _this$attribute$heigh,
15082
14956
  lineClamp = _this$attribute.lineClamp,
15083
- lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
15084
14957
  buf = ignoreBuf ? 0 : 2;
15085
- if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
14958
+ if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
15086
14959
  var _bbox = this.cache.layoutData.bbox;
15087
14960
  return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
15088
14961
  }
@@ -15114,7 +14987,7 @@
15114
14987
  if ("" !== str && "" === clip.str) {
15115
14988
  if (ellipsis) {
15116
14989
  var clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
15117
- clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
14990
+ clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
15118
14991
  } else clip.str = "", clip.width = 0;
15119
14992
  needCut = !1;
15120
14993
  }
@@ -16627,9 +16500,7 @@
16627
16500
  var Paragraph = /*#__PURE__*/function () {
16628
16501
  function Paragraph(text, newLine, character) {
16629
16502
  _classCallCheck(this, Paragraph);
16630
- this.fontSize = character.fontSize || 16, this.textBaseline = character.textBaseline || "alphabetic";
16631
- var lineHeight = calculateLineHeight(character.lineHeight, this.fontSize);
16632
- this.lineHeight = "number" == typeof lineHeight ? lineHeight > this.fontSize ? lineHeight : this.fontSize : Math.floor(1.2 * this.fontSize), this.height = this.lineHeight;
16503
+ this.fontSize = character.fontSize || 16, this.textBaseline = character.textBaseline || "alphabetic", "number" == typeof character.lineHeight ? this.lineHeight = character.lineHeight > this.fontSize ? character.lineHeight : this.fontSize : this.lineHeight = Math.floor(1.2 * this.fontSize), this.height = this.lineHeight;
16633
16504
  var _measureTextCanvas = measureTextCanvas(text, character),
16634
16505
  ascent = _measureTextCanvas.ascent,
16635
16506
  height = _measureTextCanvas.height,
@@ -20358,7 +20229,7 @@
20358
20229
  var t = textAlign;
20359
20230
  textAlign = null !== (_a = text.getBaselineMapAlign()[textBaseline]) && void 0 !== _a ? _a : "left", textBaseline = null !== (_b = text.getAlignMapBaseline()[t]) && void 0 !== _b ? _b : "top";
20360
20231
  }
20361
- var lineHeight = null !== (_c = calculateLineHeight(text.attribute.lineHeight, fontSize)) && void 0 !== _c ? _c : fontSize,
20232
+ var lineHeight = null !== (_c = text.attribute.lineHeight) && void 0 !== _c ? _c : fontSize,
20362
20233
  data = this.valid(text, textAttribute, fillCb, strokeCb);
20363
20234
  if (!data) return;
20364
20235
  var fVisible = data.fVisible,
@@ -24969,11 +24840,6 @@
24969
24840
  get: function get() {
24970
24841
  return this.at(0);
24971
24842
  }
24972
- }, {
24973
- key: "preventRender",
24974
- value: function preventRender(prevent) {
24975
- prevent ? this._skipRender = -1 / 0 : this.params && this.params.optimize && !1 !== this.params.optimize.skipRenderWithOutRange ? this._skipRender = this.window.isVisible() ? 0 : 1 : this._skipRender = 0;
24976
- }
24977
24843
  }, {
24978
24844
  key: "optmize",
24979
24845
  value: function optmize(params) {
@@ -24984,8 +24850,8 @@
24984
24850
  value: function optmizeRender() {
24985
24851
  var _this2 = this;
24986
24852
  var skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
24987
- skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(function (visible) {
24988
- _this2._skipRender < 0 || (visible ? (_this2.dirtyBounds && _this2.dirtyBounds.setValue(0, 0, _this2._viewBox.width(), _this2._viewBox.height()), _this2._skipRender > 1 && _this2.renderNextFrame(), _this2._skipRender = 0) : _this2._skipRender = 1);
24853
+ skipRenderWithOutRange && (this._skipRender = this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(function (visible) {
24854
+ visible ? (_this2.dirtyBounds && _this2.dirtyBounds.setValue(0, 0, _this2._viewBox.width(), _this2._viewBox.height()), _this2._skipRender > 1 && _this2.renderNextFrame(), _this2._skipRender = 0) : _this2._skipRender = 1;
24989
24855
  }));
24990
24856
  }
24991
24857
  }, {
@@ -33461,13 +33327,6 @@
33461
33327
  _context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
33462
33328
  }
33463
33329
  }
33464
- }, {
33465
- key: "measureText",
33466
- value: function measureText(text) {
33467
- var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
33468
- this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
33469
- return _get(_getPrototypeOf(LynxContext2d.prototype), "measureText", this).call(this, text, method);
33470
- }
33471
33330
  }, {
33472
33331
  key: "createPattern",
33473
33332
  value: function createPattern(image, repetition) {
@@ -34634,7 +34493,7 @@
34634
34493
 
34635
34494
  var roughModule = _roughModule;
34636
34495
 
34637
- const version = "0.16.14-alpha.5";
34496
+ const version = "0.16.14-alpha.6";
34638
34497
  loadAllModule(container);
34639
34498
 
34640
34499
  exports.ACustomAnimate = ACustomAnimate;
@@ -34867,7 +34726,6 @@
34867
34726
  exports.builtinSymbols = builtinSymbols;
34868
34727
  exports.builtinSymbolsMap = builtinSymbolsMap;
34869
34728
  exports.calcLineCache = calcLineCache$1;
34870
- exports.calculateLineHeight = calculateLineHeight;
34871
34729
  exports.centroidOfSubpath = centroidOfSubpath;
34872
34730
  exports.circleBounds = circleBounds;
34873
34731
  exports.clock = clock;