@visactor/vrender 0.16.13 → 0.16.14-alpha.1

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.13";
1
+ export declare const version = "0.16.14-alpha.1";
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.13", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
24
+ exports.version = "0.16.14-alpha.1", (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,SAAS,CAAC;AAEjC,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.13\";\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.1\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.js CHANGED
@@ -9948,6 +9948,12 @@
9948
9948
  }();
9949
9949
  RafBasedSTO.TimeOut = 1e3 / 60;
9950
9950
  var rafBasedSto = new RafBasedSTO();
9951
+ var calculateLineHeight = function calculateLineHeight(lineHeight, fontSize) {
9952
+ if (isString$1(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
9953
+ return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
9954
+ }
9955
+ return lineHeight;
9956
+ };
9951
9957
 
9952
9958
  var IncreaseCount = /*#__PURE__*/function (_ACustomAnimate) {
9953
9959
  _inherits(IncreaseCount, _ACustomAnimate);
@@ -14574,7 +14580,7 @@
14574
14580
  _this$attribute$fontS = _this$attribute.fontSize,
14575
14581
  fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
14576
14582
  _this$attribute$lineH = _this$attribute.lineHeight,
14577
- lineHeight = _this$attribute$lineH === void 0 ? this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize : _this$attribute$lineH,
14583
+ lineHeight = _this$attribute$lineH === void 0 ? calculateLineHeight(this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, this.attribute.fontSize || textTheme.fontSize) : _this$attribute$lineH,
14578
14584
  _this$attribute$ellip = _this$attribute.ellipsis,
14579
14585
  ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
14580
14586
  maxLineWidth = _this$attribute.maxLineWidth,
@@ -14721,8 +14727,9 @@
14721
14727
  whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace;
14722
14728
  if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
14723
14729
  var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
14730
+ textFontSize = attribute.fontSize || textTheme.fontSize,
14724
14731
  _attribute$lineHeight = attribute.lineHeight,
14725
- lineHeight = _attribute$lineHeight === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight;
14732
+ lineHeight = _attribute$lineHeight === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : textFontSize, textFontSize) + buf : _attribute$lineHeight;
14726
14733
  if (!this.shouldUpdateShape() && this.cache) {
14727
14734
  width = null !== (_b = this.cache.clipedWidth) && void 0 !== _b ? _b : 0;
14728
14735
  var _dx = textDrawOffsetX(textAlign, width),
@@ -14793,7 +14800,7 @@
14793
14800
  _attribute$stroke2 = attribute.stroke,
14794
14801
  stroke = _attribute$stroke2 === void 0 ? textTheme.stroke : _attribute$stroke2,
14795
14802
  _attribute$lineHeight2 = attribute.lineHeight,
14796
- lineHeight = _attribute$lineHeight2 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight2,
14803
+ lineHeight = _attribute$lineHeight2 === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight2,
14797
14804
  _attribute$lineWidth2 = attribute.lineWidth,
14798
14805
  lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
14799
14806
  _attribute$verticalMo = attribute.verticalMode,
@@ -14861,7 +14868,7 @@
14861
14868
  _attribute$fontWeight3 = attribute.fontWeight,
14862
14869
  fontWeight = _attribute$fontWeight3 === void 0 ? textTheme.fontWeight : _attribute$fontWeight3,
14863
14870
  _attribute$lineHeight3 = attribute.lineHeight,
14864
- lineHeight = _attribute$lineHeight3 === void 0 ? attribute.lineHeight || attribute.fontSize || textTheme.fontSize : _attribute$lineHeight3,
14871
+ lineHeight = _attribute$lineHeight3 === void 0 ? calculateLineHeight(attribute.lineHeight || attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) : _attribute$lineHeight3,
14865
14872
  _attribute$ellipsis3 = attribute.ellipsis,
14866
14873
  ellipsis = _attribute$ellipsis3 === void 0 ? textTheme.ellipsis : _attribute$ellipsis3,
14867
14874
  maxLineWidth = attribute.maxLineWidth,
@@ -14909,7 +14916,7 @@
14909
14916
  _attribute$stroke4 = attribute.stroke,
14910
14917
  stroke = _attribute$stroke4 === void 0 ? textTheme.stroke : _attribute$stroke4,
14911
14918
  _attribute$lineHeight4 = attribute.lineHeight,
14912
- lineHeight = _attribute$lineHeight4 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight4,
14919
+ lineHeight = _attribute$lineHeight4 === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight4,
14913
14920
  _attribute$lineWidth4 = attribute.lineWidth,
14914
14921
  lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
14915
14922
  _attribute$verticalMo2 = attribute.verticalMode,
@@ -15058,7 +15065,7 @@
15058
15065
  _this$attribute$fontS = _this$attribute.fontSize,
15059
15066
  fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
15060
15067
  _this$attribute$lineH = _this$attribute.lineHeight,
15061
- lineHeight = _this$attribute$lineH === void 0 ? this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize : _this$attribute$lineH,
15068
+ lineHeight = _this$attribute$lineH === void 0 ? calculateLineHeight(this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, this.attribute.fontSize || textTheme.fontSize) : _this$attribute$lineH,
15062
15069
  _this$attribute$ellip = _this$attribute.ellipsis,
15063
15070
  ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
15064
15071
  maxLineWidth = _this$attribute.maxLineWidth,
@@ -34626,7 +34633,7 @@
34626
34633
 
34627
34634
  var roughModule = _roughModule;
34628
34635
 
34629
- const version = "0.16.13";
34636
+ const version = "0.16.14-alpha.1";
34630
34637
  loadAllModule(container);
34631
34638
 
34632
34639
  exports.ACustomAnimate = ACustomAnimate;
@@ -34859,6 +34866,7 @@
34859
34866
  exports.builtinSymbols = builtinSymbols;
34860
34867
  exports.builtinSymbolsMap = builtinSymbolsMap;
34861
34868
  exports.calcLineCache = calcLineCache$1;
34869
+ exports.calculateLineHeight = calculateLineHeight;
34862
34870
  exports.centroidOfSubpath = centroidOfSubpath;
34863
34871
  exports.circleBounds = circleBounds;
34864
34872
  exports.clock = clock;