@visactor/vrender-components 0.16.18-alpha.0 → 0.16.19-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,4 +1,4 @@
1
- export declare const version = "0.16.18-alpha.0";
1
+ export declare const version = "0.16.19-alpha.1";
2
2
  export * from './core/base';
3
3
  export * from './scrollbar';
4
4
  export * from './tag';
package/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), exports.version = void 0, exports.version = "0.16.18-alpha.0", __exportStar(require("./core/base"), exports),
20
+ }), exports.version = void 0, exports.version = "0.16.19-alpha.1", __exportStar(require("./core/base"), exports),
21
21
  __exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
22
22
  __exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
23
23
  __exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.16.18-alpha.0\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.16.19-alpha.1\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
@@ -6,3 +6,4 @@ export * from './size/size';
6
6
  export * from './size/type';
7
7
  export * from './type';
8
8
  export * from './constant';
9
+ export * from './util';
@@ -20,5 +20,6 @@ Object.defineProperty(exports, "__esModule", {
20
20
  }), __exportStar(require("./discrete/discrete"), exports), __exportStar(require("./discrete/type"), exports),
21
21
  __exportStar(require("./color/color"), exports), __exportStar(require("./color/type"), exports),
22
22
  __exportStar(require("./size/size"), exports), __exportStar(require("./size/type"), exports),
23
- __exportStar(require("./type"), exports), __exportStar(require("./constant"), exports);
23
+ __exportStar(require("./type"), exports), __exportStar(require("./constant"), exports),
24
+ __exportStar(require("./util"), exports);
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/legend/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,yCAAuB;AACvB,6CAA2B","file":"index.js","sourcesContent":["export * from './discrete/discrete';\nexport * from './discrete/type';\nexport * from './color/color';\nexport * from './color/type';\nexport * from './size/size';\nexport * from './size/type';\nexport * from './type';\nexport * from './constant';\n"]}
1
+ {"version":3,"sources":["../src/legend/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB","file":"index.js","sourcesContent":["export * from './discrete/discrete';\nexport * from './discrete/type';\nexport * from './color/color';\nexport * from './color/type';\nexport * from './size/size';\nexport * from './size/type';\nexport * from './type';\nexport * from './constant';\nexport * from './util';\n"]}
package/dist/index.js CHANGED
@@ -4473,9 +4473,13 @@
4473
4473
  verticalMode: 0,
4474
4474
  whiteSpace: "no-wrap",
4475
4475
  heightLimit: 1 / 0,
4476
- lineClamp: 1 / 0
4476
+ lineClamp: 1 / 0,
4477
+ suffixPosition: "end"
4477
4478
  };
4478
- var DefaultStyle = Object.assign(Object.assign(Object.assign({
4479
+ var DefaultPickStyle = {
4480
+ pickStrokeBuffer: 0
4481
+ };
4482
+ var DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
4479
4483
  opacity: 1,
4480
4484
  background: null,
4481
4485
  texture: null,
@@ -4486,7 +4490,7 @@
4486
4490
  blur: 0,
4487
4491
  cursor: null,
4488
4492
  html: null
4489
- }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout);
4493
+ }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
4490
4494
  var DefaultConnectAttribute = {
4491
4495
  connectedType: "none",
4492
4496
  connectedStyle: {},
@@ -4568,7 +4572,7 @@
4568
4572
  var DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
4569
4573
  path: new CustomPath2D(),
4570
4574
  customPath: function customPath() {
4571
- console.warn("空函数");
4575
+ vutils.Logger.getInstance().warn("空函数");
4572
4576
  }
4573
4577
  });
4574
4578
  var DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
@@ -4832,7 +4836,7 @@
4832
4836
  i = 0;
4833
4837
  for (; i < verticalList.length && length + verticalList[i].width < width; i++) length += verticalList[i].width, out.push(verticalList[i]);
4834
4838
  if (verticalList[i] && verticalList[i].text.length > 1) {
4835
- var clipedData = this._clipText(verticalList[i].text, options, width - length, 0, verticalList[i].text.length - 1);
4839
+ var clipedData = this._clipText(verticalList[i].text, options, width - length, 0, verticalList[i].text.length - 1, "end", !1);
4836
4840
  if (wordBreak && clipedData.str !== verticalList[i].text) {
4837
4841
  var text = "",
4838
4842
  _length = 0;
@@ -4871,7 +4875,7 @@
4871
4875
  str: "",
4872
4876
  width: 0
4873
4877
  };
4874
- var data = this._clipText(text, options, width, 0, text.length - 1);
4878
+ var data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
4875
4879
  if (wordBreak && data.str !== text) {
4876
4880
  var index = testLetter(text, data.str.length);
4877
4881
  index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
@@ -4880,7 +4884,21 @@
4880
4884
  }
4881
4885
  }, {
4882
4886
  key: "_clipText",
4883
- value: function _clipText(text, options, width, leftIdx, rightIdx) {
4887
+ value: function _clipText(text, options, width, leftIdx, rightIdx, position, suffix) {
4888
+ var data;
4889
+ if ("end" === position) data = this._clipTextEnd(text, options, width, leftIdx, rightIdx), suffix && (data.result = data.str + suffix);else if ("start" === position) data = this._clipTextStart(text, options, width, leftIdx, rightIdx), suffix && (data.result = suffix + data.str);else if ("middle" === position) {
4890
+ var d = this._clipTextMiddle(text, options, width, "", "", 0, 0, 1);
4891
+ data = {
4892
+ str: "none",
4893
+ width: d.width,
4894
+ result: d.left + suffix + d.right
4895
+ };
4896
+ }
4897
+ return data;
4898
+ }
4899
+ }, {
4900
+ key: "_clipTextEnd",
4901
+ value: function _clipTextEnd(text, options, width, leftIdx, rightIdx) {
4884
4902
  var middleIdx = Math.floor((leftIdx + rightIdx) / 2),
4885
4903
  subText = text.substring(0, middleIdx + 1),
4886
4904
  strWidth = this.measureTextWidth(subText, options);
@@ -4894,7 +4912,7 @@
4894
4912
  return length = this.measureTextWidth(str, options), length <= width ? {
4895
4913
  str: str,
4896
4914
  width: length
4897
- } : this._clipText(text, options, width, leftIdx, middleIdx);
4915
+ } : this._clipTextEnd(text, options, width, leftIdx, middleIdx);
4898
4916
  }
4899
4917
  if (strWidth < width) {
4900
4918
  if (middleIdx >= text.length - 1) return {
@@ -4905,16 +4923,68 @@
4905
4923
  return length = this.measureTextWidth(_str, options), length >= width ? {
4906
4924
  str: subText,
4907
4925
  width: strWidth
4908
- } : this._clipText(text, options, width, middleIdx, rightIdx);
4926
+ } : this._clipTextEnd(text, options, width, middleIdx, rightIdx);
4909
4927
  }
4910
4928
  return {
4911
4929
  str: subText,
4912
4930
  width: strWidth
4913
4931
  };
4914
4932
  }
4933
+ }, {
4934
+ key: "_clipTextStart",
4935
+ value: function _clipTextStart(text, options, width, leftIdx, rightIdx) {
4936
+ var middleIdx = Math.ceil((leftIdx + rightIdx) / 2),
4937
+ subText = text.substring(middleIdx - 1, text.length - 1),
4938
+ strWidth = this.measureTextWidth(subText, options);
4939
+ var length;
4940
+ if (strWidth > width) {
4941
+ if (subText.length <= 1) return {
4942
+ str: "",
4943
+ width: 0
4944
+ };
4945
+ var str = text.substring(middleIdx, text.length - 1);
4946
+ return length = this.measureTextWidth(str, options), length <= width ? {
4947
+ str: str,
4948
+ width: length
4949
+ } : this._clipTextStart(text, options, width, middleIdx, text.length - 1);
4950
+ }
4951
+ if (strWidth < width) {
4952
+ if (middleIdx <= 0) return {
4953
+ str: text,
4954
+ width: this.measureTextWidth(text, options)
4955
+ };
4956
+ var _str2 = text.substring(middleIdx - 2, text.length - 1);
4957
+ return length = this.measureTextWidth(_str2, options), length >= width ? {
4958
+ str: subText,
4959
+ width: strWidth
4960
+ } : this._clipTextStart(text, options, width, leftIdx, middleIdx);
4961
+ }
4962
+ return {
4963
+ str: subText,
4964
+ width: strWidth
4965
+ };
4966
+ }
4967
+ }, {
4968
+ key: "_clipTextMiddle",
4969
+ value: function _clipTextMiddle(text, options, width, left, right, leftW, rightW, buffer) {
4970
+ var subLeftText = text.substring(0, buffer),
4971
+ strLeftWidth = this.measureTextWidth(subLeftText, options);
4972
+ if (strLeftWidth + rightW > width) return {
4973
+ left: left,
4974
+ right: right,
4975
+ width: leftW + rightW
4976
+ };
4977
+ var subRightText = text.substring(text.length - buffer, text.length),
4978
+ strRightWidth = this.measureTextWidth(subRightText, options);
4979
+ return strLeftWidth + strRightWidth > width ? {
4980
+ left: subLeftText,
4981
+ right: right,
4982
+ width: strLeftWidth + rightW
4983
+ } : this._clipTextMiddle(text, options, width, subLeftText, subRightText, strLeftWidth, strRightWidth, buffer + 1);
4984
+ }
4915
4985
  }, {
4916
4986
  key: "clipTextWithSuffixVertical",
4917
- value: function clipTextWithSuffixVertical(verticalList, options, width, suffix, wordBreak) {
4987
+ value: function clipTextWithSuffixVertical(verticalList, options, width, suffix, wordBreak, suffixPosition) {
4918
4988
  if ("" === suffix) return this.clipTextVertical(verticalList, options, width, wordBreak);
4919
4989
  if (0 === verticalList.length) return {
4920
4990
  verticalList: verticalList,
@@ -4924,17 +4994,50 @@
4924
4994
  if (output.verticalList.length === verticalList.length && output.verticalList[output.verticalList.length - 1].width === verticalList[verticalList.length - 1].width) return output;
4925
4995
  var suffixWidth = this.measureTextWidth(suffix, options);
4926
4996
  if (suffixWidth > width) return output;
4927
- width -= suffixWidth;
4928
- var out = this.clipTextVertical(verticalList, options, width, wordBreak);
4929
- return out.width += suffixWidth, out.verticalList.push({
4997
+ var out;
4998
+ if (width -= suffixWidth, "start" === suffixPosition) {
4999
+ var nextVerticalList = this.revertVerticalList(verticalList);
5000
+ out = this.clipTextVertical(nextVerticalList, options, width, wordBreak);
5001
+ var v = this.revertVerticalList(out.verticalList);
5002
+ v.unshift({
5003
+ text: suffix,
5004
+ direction: 1,
5005
+ width: suffixWidth
5006
+ }), out.verticalList = v;
5007
+ } else if ("middle" === suffixPosition) {
5008
+ var leftOut = this.clipTextVertical(verticalList, options, width / 2, wordBreak),
5009
+ _nextVerticalList = this.revertVerticalList(verticalList),
5010
+ rightOut = this.clipTextVertical(_nextVerticalList, options, width / 2, wordBreak);
5011
+ leftOut.verticalList.push({
5012
+ text: suffix,
5013
+ direction: 1,
5014
+ width: suffixWidth
5015
+ }), this.revertVerticalList(rightOut.verticalList).forEach(function (v) {
5016
+ return leftOut.verticalList.push(v);
5017
+ }), out = {
5018
+ verticalList: leftOut.verticalList,
5019
+ width: leftOut.width + rightOut.width
5020
+ };
5021
+ } else out = this.clipTextVertical(verticalList, options, width, wordBreak), out.verticalList.push({
4930
5022
  text: suffix,
4931
5023
  direction: 1,
4932
5024
  width: suffixWidth
4933
- }), out;
5025
+ });
5026
+ return out.width += suffixWidth, out;
5027
+ }
5028
+ }, {
5029
+ key: "revertVerticalList",
5030
+ value: function revertVerticalList(verticalList) {
5031
+ return verticalList.reverse().map(function (l) {
5032
+ var t = l.text.split("").reverse().join("");
5033
+ return Object.assign(Object.assign({}, l), {
5034
+ text: t
5035
+ });
5036
+ });
4934
5037
  }
4935
5038
  }, {
4936
5039
  key: "clipTextWithSuffix",
4937
- value: function clipTextWithSuffix(text, options, width, suffix, wordBreak) {
5040
+ value: function clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
4938
5041
  if ("" === suffix) return this.clipText(text, options, width, wordBreak);
4939
5042
  if (0 === text.length) return {
4940
5043
  str: "",
@@ -4951,12 +5054,12 @@
4951
5054
  width: 0
4952
5055
  };
4953
5056
  width -= suffixWidth;
4954
- var data = this._clipText(text, options, width, 0, text.length - 1);
5057
+ var data = this._clipText(text, options, width, 0, text.length - 1, position, suffix);
4955
5058
  if (wordBreak && data.str !== text) {
4956
5059
  var index = testLetter(text, data.str.length);
4957
5060
  index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4958
5061
  }
4959
- return data.str += suffix, data.width += suffixWidth, data;
5062
+ return data.str = data.result, data.width += suffixWidth, data;
4960
5063
  }
4961
5064
  }]);
4962
5065
  return ATextMeasure;
@@ -5592,7 +5695,7 @@
5592
5695
  var parentTheme = parentGroup.theme;
5593
5696
  (parentTheme.dirty || force) && parentTheme.applyTheme(parentGroup, pt, !0), this.userTheme ? combineTheme(this.userTheme, parentTheme.userTheme, !1) : this.userTheme = vutils.clone(parentTheme.userTheme), combineTheme(pt, parentTheme.userTheme);
5594
5697
  }
5595
- this.userTheme ? this.doCombine(pt) : (parentGroup ? this.combinedTheme = parentGroup.theme.combinedTheme : (this.combinedTheme = this._defaultTheme, console.warn("未知错误,走到不应该走的区域里")), this.dirty = !1);
5698
+ this.userTheme ? this.doCombine(pt) : (parentGroup ? this.combinedTheme = parentGroup.theme.combinedTheme : (this.combinedTheme = this._defaultTheme, vutils.Logger.getInstance().warn("未知错误,走到不应该走的区域里")), this.dirty = !1);
5596
5699
  }
5597
5700
  return this.combinedTheme;
5598
5701
  }
@@ -5864,7 +5967,7 @@
5864
5967
  }, {
5865
5968
  key: "insertInto",
5866
5969
  value: function insertInto(newNode, idx) {
5867
- if (!this._ignoreWarn && this._nodeList && console.warn("insertIntoKeepIdx和insertInto混用可能会存在错误"), idx >= this.childrenCount) return this.appendChild(newNode);
5970
+ if (!this._ignoreWarn && this._nodeList && vutils.Logger.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"), idx >= this.childrenCount) return this.appendChild(newNode);
5868
5971
  if (this._uid === newNode._uid) return null;
5869
5972
  if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");
5870
5973
  if (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, 0 === idx) newNode._next = this._firstChild, this._firstChild && (this._firstChild._prev = newNode), newNode._prev = null, this._firstChild = newNode;else {
@@ -6516,7 +6619,7 @@
6516
6619
  handler = new ManualTickHandler();
6517
6620
  break;
6518
6621
  default:
6519
- console.warn("非法的计时器模式"), handler = new RAFTickHandler();
6622
+ vutils.Logger.getInstance().warn("非法的计时器模式"), handler = new RAFTickHandler();
6520
6623
  }
6521
6624
  return !!handler.avaliable() && (this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0);
6522
6625
  }
@@ -7311,7 +7414,7 @@
7311
7414
  }
7312
7415
  lastStep = lastStep.prev;
7313
7416
  }
7314
- return console.warn("未知错误,step中找不到属性"), step.props[name];
7417
+ return vutils.Logger.getInstance().warn("未知错误,step中找不到属性"), step.props[name];
7315
7418
  }
7316
7419
  }, {
7317
7420
  key: "updateTarget",
@@ -8417,6 +8520,7 @@
8417
8520
  if (!animate.validAttr(key)) return;
8418
8521
  var nextStepVal = nextProps[key],
8419
8522
  lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
8523
+ if (null == nextStepVal || null == lastStepVal) return void (nextAttributes[key] = nextStepVal);
8420
8524
  var match;
8421
8525
  match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes), match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, _this7, nextAttributes), match || _this7.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || _this7._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
8422
8526
  }), step.parsedProps = nextParsedProps;
@@ -9898,12 +10002,12 @@
9898
10002
  }
9899
10003
  }, {
9900
10004
  key: "GetLayout",
9901
- value: function GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, miniApp) {
10005
+ value: function GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, suffixPosition) {
9902
10006
  var linesLayout = [],
9903
10007
  bboxWH = [width, height],
9904
10008
  bboxOffset = [0, 0];
9905
10009
  for (; str.length > 0;) {
9906
- var _this$textMeasure$cli = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak),
10010
+ var _this$textMeasure$cli = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak, suffixPosition),
9907
10011
  clipText = _this$textMeasure$cli.str;
9908
10012
  linesLayout.push({
9909
10013
  str: clipText,
@@ -9925,6 +10029,7 @@
9925
10029
  var suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
9926
10030
  var wordBreak = arguments.length > 5 ? arguments[5] : undefined;
9927
10031
  var lineWidth = arguments.length > 6 ? arguments[6] : undefined;
10032
+ var suffixPosition = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "end";
9928
10033
  lines = lines.map(function (l) {
9929
10034
  return l.toString();
9930
10035
  });
@@ -9933,7 +10038,7 @@
9933
10038
  if ("number" == typeof lineWidth && lineWidth !== 1 / 0) {
9934
10039
  var width;
9935
10040
  for (var i = 0, len = lines.length; i < len; i++) width = Math.min(this.textMeasure.measureTextWidth(lines[i], this.textOptions), lineWidth), linesLayout.push({
9936
- str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak).str,
10041
+ str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
9937
10042
  width: width
9938
10043
  });
9939
10044
  bboxWH[0] = lineWidth;
@@ -10211,12 +10316,12 @@
10211
10316
  stroke = _attribute$stroke === void 0 ? textTheme.stroke : _attribute$stroke,
10212
10317
  _attribute$lineWidth = attribute.lineWidth,
10213
10318
  lineWidth = _attribute$lineWidth === void 0 ? textTheme.lineWidth : _attribute$lineWidth,
10214
- _attribute$wordBreak = attribute.wordBreak;
10215
- _attribute$wordBreak === void 0 ? textTheme.wordBreak : _attribute$wordBreak;
10216
- var _attribute$ignoreBuf = attribute.ignoreBuf,
10319
+ _attribute$ignoreBuf = attribute.ignoreBuf,
10217
10320
  ignoreBuf = _attribute$ignoreBuf === void 0 ? textTheme.ignoreBuf : _attribute$ignoreBuf,
10218
10321
  _attribute$whiteSpace = attribute.whiteSpace,
10219
- whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace;
10322
+ whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace,
10323
+ _attribute$suffixPosi = attribute.suffixPosition,
10324
+ suffixPosition = _attribute$suffixPosi === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi;
10220
10325
  if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
10221
10326
  var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
10222
10327
  textFontSize = attribute.fontSize || textTheme.fontSize,
@@ -10234,7 +10339,7 @@
10234
10339
  fontSize: fontSize,
10235
10340
  fontWeight: fontWeight,
10236
10341
  fontFamily: fontFamily
10237
- }, maxLineWidth, strEllipsis, !1);
10342
+ }, maxLineWidth, strEllipsis, !1, suffixPosition);
10238
10343
  str = data.str, width = data.width;
10239
10344
  } else {
10240
10345
  var _data = textMeasure.clipText(text.toString(), {
@@ -10294,6 +10399,8 @@
10294
10399
  lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
10295
10400
  _attribute$verticalMo = attribute.verticalMode,
10296
10401
  verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo,
10402
+ _attribute$suffixPosi2 = attribute.suffixPosition,
10403
+ suffixPosition = _attribute$suffixPosi2 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi2,
10297
10404
  lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10298
10405
  var _attribute$textAlign2 = attribute.textAlign,
10299
10406
  textAlign = _attribute$textAlign2 === void 0 ? textTheme.textAlign : _attribute$textAlign2,
@@ -10317,7 +10424,7 @@
10317
10424
  fontSize: fontSize,
10318
10425
  fontWeight: fontWeight,
10319
10426
  fontFamily: fontFamily
10320
- }, maxLineWidth, strEllipsis, !1);
10427
+ }, maxLineWidth, strEllipsis, !1, suffixPosition);
10321
10428
  verticalList = [data.verticalList], width = data.width;
10322
10429
  } else {
10323
10430
  var _data2 = textMeasure.clipTextVertical(verticalList[0], {
@@ -10366,6 +10473,8 @@
10366
10473
  lineWidth = _attribute$lineWidth3 === void 0 ? textTheme.lineWidth : _attribute$lineWidth3,
10367
10474
  _attribute$whiteSpace2 = attribute.whiteSpace,
10368
10475
  whiteSpace = _attribute$whiteSpace2 === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace2,
10476
+ _attribute$suffixPosi3 = attribute.suffixPosition,
10477
+ suffixPosition = _attribute$suffixPosi3 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi3,
10369
10478
  lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
10370
10479
  if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
10371
10480
  if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
@@ -10377,7 +10486,7 @@
10377
10486
  fontSize: fontSize,
10378
10487
  fontWeight: fontWeight,
10379
10488
  fontFamily: fontFamily
10380
- }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth),
10489
+ }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth, suffixPosition),
10381
10490
  bbox = layoutData.bbox;
10382
10491
  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;
10383
10492
  }
@@ -10408,6 +10517,8 @@
10408
10517
  lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
10409
10518
  _attribute$verticalMo2 = attribute.verticalMode,
10410
10519
  verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2,
10520
+ _attribute$suffixPosi4 = attribute.suffixPosition,
10521
+ suffixPosition = _attribute$suffixPosi4 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi4,
10411
10522
  lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10412
10523
  var _attribute$textAlign4 = attribute.textAlign,
10413
10524
  textAlign = _attribute$textAlign4 === void 0 ? textTheme.textAlign : _attribute$textAlign4,
@@ -10440,7 +10551,7 @@
10440
10551
  fontSize: fontSize,
10441
10552
  fontWeight: fontWeight,
10442
10553
  fontFamily: fontFamily
10443
- }, maxLineWidth, strEllipsis, !1);
10554
+ }, maxLineWidth, strEllipsis, !1, suffixPosition);
10444
10555
  verticalLists[i] = data.verticalList, width = data.width;
10445
10556
  } else {
10446
10557
  var _data3 = textMeasure.clipTextVertical(verticalData, {
@@ -11576,6 +11687,7 @@
11576
11687
  }, {
11577
11688
  key: "_isValid",
11578
11689
  value: function _isValid() {
11690
+ if (this.pathProxy) return !0;
11579
11691
  var _this$attribute = this.attribute,
11580
11692
  points = _this$attribute.points,
11581
11693
  segments = _this$attribute.segments;
@@ -12711,6 +12823,7 @@
12711
12823
  }, {
12712
12824
  key: "_isValid",
12713
12825
  value: function _isValid() {
12826
+ if (this.pathProxy) return !0;
12714
12827
  var _this$attribute = this.attribute,
12715
12828
  points = _this$attribute.points,
12716
12829
  segments = _this$attribute.segments;
@@ -13936,17 +14049,23 @@
13936
14049
  shadowBlur = _attribute$shadowBlur2 === void 0 ? theme.shadowBlur : _attribute$shadowBlur2,
13937
14050
  _attribute$lineWidth = attribute.lineWidth,
13938
14051
  lineWidth = _attribute$lineWidth === void 0 ? theme.lineWidth : _attribute$lineWidth,
14052
+ _attribute$pickStroke = attribute.pickStrokeBuffer,
14053
+ pickStrokeBuffer = _attribute$pickStroke === void 0 ? theme.pickStrokeBuffer : _attribute$pickStroke,
13939
14054
  _attribute$strokeBoun2 = attribute.strokeBoundsBuffer,
13940
14055
  strokeBoundsBuffer = _attribute$strokeBoun2 === void 0 ? theme.strokeBoundsBuffer : _attribute$strokeBoun2,
13941
14056
  tb1 = this.tempAABBBounds1,
13942
14057
  tb2 = this.tempAABBBounds2;
13943
14058
  if (stroke) {
13944
- var scaledHalfLineWidth = lineWidth / Math.abs(scaleX + scaleY);
14059
+ var scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
13945
14060
  boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
13946
14061
  }
13947
14062
  if (shadowBlur) {
13948
- var shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
13949
- boundStroke(tb1, shadowBlurHalfWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1);
14063
+ var _attribute$shadowOffs = attribute.shadowOffsetX,
14064
+ shadowOffsetX = _attribute$shadowOffs === void 0 ? theme.shadowOffsetX : _attribute$shadowOffs,
14065
+ _attribute$shadowOffs2 = attribute.shadowOffsetY,
14066
+ shadowOffsetY = _attribute$shadowOffs2 === void 0 ? theme.shadowOffsetY : _attribute$shadowOffs2,
14067
+ shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2 + Math.max(shadowOffsetX, shadowOffsetY);
14068
+ boundStroke(tb1, shadowBlurWidth, miter, strokeBoundsBuffer + 1), aabbBounds.union(tb1);
13950
14069
  }
13951
14070
  this.combindShadowAABBBounds(aabbBounds, graphic), vutils.transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix);
13952
14071
  }
@@ -18007,7 +18126,7 @@
18007
18126
  }, {
18008
18127
  key: "selectRenderByType",
18009
18128
  value: function selectRenderByType(type) {
18010
- return console.warn("未知错误,不应该走到这里"), null;
18129
+ return vutils.Logger.getInstance().warn("未知错误,不应该走到这里"), null;
18011
18130
  }
18012
18131
  }, {
18013
18132
  key: "selectRenderByNumberType",
@@ -31738,7 +31857,7 @@
31738
31857
  }
31739
31858
  };
31740
31859
 
31741
- const version = "0.16.18-alpha.0";
31860
+ const version = "0.16.19-alpha.1";
31742
31861
 
31743
31862
  exports.AbstractComponent = AbstractComponent;
31744
31863
  exports.ArcInfo = ArcInfo;
@@ -31795,6 +31914,7 @@
31795
31914
  exports.Tooltip = Tooltip;
31796
31915
  exports.VTag = VTag;
31797
31916
  exports.getHorizontalPath = getHorizontalPath;
31917
+ exports.getSizeHandlerPath = getSizeHandlerPath;
31798
31918
  exports.getVerticalPath = getVerticalPath;
31799
31919
  exports.loadPoptip = loadPoptip;
31800
31920
  exports.loadScrollbar = loadScrollbar;