@visactor/vrender-components 0.21.0-alpha.10 → 0.21.0-alpha.12

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.21.0-alpha.10";
1
+ export declare const version = "0.21.0-alpha.12";
2
2
  export * from './core/base';
3
3
  export * from './core/type';
4
4
  export * from './scrollbar';
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.21.0-alpha.10", __exportStar(require("./core/base"), exports),
20
+ }), exports.version = void 0, exports.version = "0.21.0-alpha.12", __exportStar(require("./core/base"), exports),
21
21
  __exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
22
22
  __exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
23
23
  __exportStar(require("./crosshair"), exports), __exportStar(require("./label"), 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,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,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.21.0-alpha.10\";\n\nexport * from './core/base';\nexport * from './core/type';\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 './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,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,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.21.0-alpha.12\";\n\nexport * from './core/base';\nexport * from './core/type';\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 './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
@@ -18,4 +18,4 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), __exportStar(require("./indicator"), exports), __exportStar(require("./type"), exports);
21
- //# sourceMappingURL=index.js.map
21
+ //# sourceMappingURL=index.js.map
@@ -101,4 +101,4 @@ class Indicator extends base_1.AbstractComponent {
101
101
  }
102
102
 
103
103
  exports.Indicator = Indicator;
104
- //# sourceMappingURL=indicator.js.map
104
+ //# sourceMappingURL=indicator.js.map
@@ -11,4 +11,4 @@ function loadIndicatorComponent() {
11
11
  }
12
12
 
13
13
  exports.loadIndicatorComponent = loadIndicatorComponent;
14
- //# sourceMappingURL=register.js.map
14
+ //# sourceMappingURL=register.js.map
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=type.js.map
6
+ //# sourceMappingURL=type.js.map
package/cjs/label/arc.js CHANGED
@@ -507,5 +507,4 @@ const registerArcDataLabel = () => {
507
507
  (0, data_label_register_1.registerLabelComponent)("arc", ArcLabel);
508
508
  };
509
509
 
510
- exports.registerArcDataLabel = registerArcDataLabel;
511
- //# sourceMappingURL=arc.js.map
510
+ exports.registerArcDataLabel = registerArcDataLabel;
package/cjs/label/line.js CHANGED
@@ -56,4 +56,5 @@ const registerLineDataLabel = () => {
56
56
  (0, data_label_register_1.registerLabelComponent)("line", LineLabel), (0, data_label_register_1.registerLabelComponent)("area", LineLabel);
57
57
  };
58
58
 
59
- exports.registerLineDataLabel = registerLineDataLabel;
59
+ exports.registerLineDataLabel = registerLineDataLabel;
60
+ //# sourceMappingURL=line.js.map
@@ -12,4 +12,4 @@ function loadLabelComponent() {
12
12
  }
13
13
 
14
14
  exports.loadLabelComponent = loadLabelComponent;
15
- //# sourceMappingURL=register.js.map
15
+ //# sourceMappingURL=register.js.map
@@ -41,4 +41,4 @@ const registerSymbolDataLabel = () => {
41
41
  };
42
42
 
43
43
  exports.registerSymbolDataLabel = registerSymbolDataLabel;
44
- //# sourceMappingURL=symbol.js.map
44
+ //# sourceMappingURL=symbol.js.map
package/cjs/label/type.js CHANGED
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=type.js.map
6
+ //# sourceMappingURL=type.js.map
package/cjs/label/util.js CHANGED
@@ -175,4 +175,4 @@ function getAlignOffset(align) {
175
175
 
176
176
  exports.getPointsOfLineArea = getPointsOfLineArea, exports.labelingLineOrArea = labelingLineOrArea,
177
177
  exports.connectLineBetweenBounds = connectLineBetweenBounds, exports.getAlignOffset = getAlignOffset;
178
- //# sourceMappingURL=util.js.map
178
+ //# sourceMappingURL=util.js.map
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, cos, sin, pi, isArray, pointAt, isNumber, getDecimalPlaces, isNil, Color, OBBBounds, has, normalTransform, isValidUrl, isBase64, acos, sqrt, transformBoundsWithMatrix, arrayEqual, getContextFont, rotatePoint, clampAngleByRadian, asin, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, isValid, isEmpty, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian, array, isValidNumber, calculateAnchorOfBounds, computeQuadrant, isGreater, isLess, normalizeAngle, flattenArray, cloneDeep, get, last, isRotateAABBIntersect, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
1
+ import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, cos, sin, pi, isString, isArray, pointAt, isNumber, getDecimalPlaces, isNil, Color, OBBBounds, has, normalTransform, isValidUrl, isBase64, acos, sqrt, transformBoundsWithMatrix, arrayEqual, getContextFont, rotatePoint, clampAngleByRadian, asin, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, isValid, isEmpty, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian, array, isValidNumber, calculateAnchorOfBounds, computeQuadrant, isGreater, isLess, normalizeAngle, flattenArray, cloneDeep, get, last, isRotateAABBIntersect, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
2
2
  import { isContinuous, isDiscrete, LinearScale } from '@visactor/vscale';
3
3
 
4
4
  class Generator {
@@ -2039,7 +2039,8 @@ const DefaultTextStyle = {
2039
2039
  underlineDash: [],
2040
2040
  underlineOffset: 0,
2041
2041
  disableAutoClipedPoptip: void 0,
2042
- measureMode: MeasureModeEnum.fontBounding
2042
+ measureMode: MeasureModeEnum.fontBounding,
2043
+ keepCenterInLine: !1
2043
2044
  };
2044
2045
  const DefaultPickStyle = {
2045
2046
  pickStrokeBuffer: 0
@@ -4273,12 +4274,16 @@ function getAttributeFromDefaultAttrList(attr, key) {
4273
4274
  }
4274
4275
  return attr[key];
4275
4276
  }
4276
- const calculateLineHeight = (lineHeight, fontSize) => {
4277
+ const _calculateLineHeight = (lineHeight, fontSize) => {
4277
4278
  if (isString(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
4278
4279
  return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
4279
4280
  }
4280
4281
  return lineHeight;
4281
4282
  };
4283
+ const calculateLineHeight = (lineHeight, fontSize) => {
4284
+ const _lh = _calculateLineHeight(lineHeight, fontSize);
4285
+ return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
4286
+ };
4282
4287
 
4283
4288
  class IncreaseCount extends ACustomAnimate {
4284
4289
  constructor(from, to, duration, easing, params) {
@@ -9551,11 +9556,7 @@ class CanvasTextLayout {
9551
9556
  this.fontFamily = fontFamily, this.textOptions = options, this.textMeasure = textMeasure;
9552
9557
  }
9553
9558
  LayoutBBox(bbox, textAlign, textBaseline, linesLayout) {
9554
- if ("left" === textAlign || "start" === textAlign) bbox.xOffset = 0;else if ("center" === textAlign) bbox.xOffset = bbox.width / -2;else {
9555
- if ("right" !== textAlign && "end" !== textAlign) throw new Error("非法的textAlign");
9556
- bbox.xOffset = -bbox.width;
9557
- }
9558
- if ("top" === textBaseline) bbox.yOffset = 0;else if ("middle" === textBaseline) bbox.yOffset = bbox.height / -2;else if ("alphabetic" === textBaseline) {
9559
+ if (bbox.xOffset = "left" === textAlign || "start" === textAlign ? 0 : "center" === textAlign ? bbox.width / -2 : "right" === textAlign || "end" === textAlign ? -bbox.width : 0, "top" === textBaseline) bbox.yOffset = 0;else if ("middle" === textBaseline) bbox.yOffset = bbox.height / -2;else if ("alphabetic" === textBaseline) {
9559
9560
  let percent = .79;
9560
9561
  if (1 === linesLayout.length) {
9561
9562
  const lineInfo = linesLayout[0];
@@ -9572,7 +9573,8 @@ class CanvasTextLayout {
9572
9573
  const {
9573
9574
  lineWidth: lineWidth,
9574
9575
  suffixPosition = "end",
9575
- measureMode = MeasureModeEnum.actualBounding
9576
+ measureMode = MeasureModeEnum.actualBounding,
9577
+ keepCenterInLine = !1
9576
9578
  } = null != params ? params : {};
9577
9579
  lines = lines.map(l => l.toString());
9578
9580
  const linesLayout = [],
@@ -9585,7 +9587,8 @@ class CanvasTextLayout {
9585
9587
  str: metrics.width <= lineWidth ? lines[i].toString() : this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
9586
9588
  width: width,
9587
9589
  ascent: metrics.ascent,
9588
- descent: metrics.descent
9590
+ descent: metrics.descent,
9591
+ keepCenterInLine: keepCenterInLine
9589
9592
  });
9590
9593
  }
9591
9594
  bboxWH[0] = lineWidth;
@@ -9600,7 +9603,8 @@ class CanvasTextLayout {
9600
9603
  str: text,
9601
9604
  width: width,
9602
9605
  ascent: metrics.ascent,
9603
- descent: metrics.descent
9606
+ descent: metrics.descent,
9607
+ keepCenterInLine: keepCenterInLine
9604
9608
  });
9605
9609
  }
9606
9610
  bboxWH[0] = _lineWidth;
@@ -9631,9 +9635,15 @@ class CanvasTextLayout {
9631
9635
  };
9632
9636
  }
9633
9637
  lineOffset(bbox, line, textAlign, textBaseline, lineHeight, origin) {
9634
- "left" === textAlign || "start" === textAlign ? line.leftOffset = 0 : "center" === textAlign ? line.leftOffset = (bbox.width - line.width) / 2 : "right" !== textAlign && "end" !== textAlign || (line.leftOffset = bbox.width - line.width), line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 + origin[1];
9635
- const actualHeightWithBuf = line.ascent + line.descent + 0;
9636
- return actualHeightWithBuf < lineHeight - 0 && ("bottom" === textBaseline ? line.topOffset += (lineHeight - actualHeightWithBuf) / 2 : "top" === textBaseline && (line.topOffset -= (lineHeight - actualHeightWithBuf) / 2)), origin[1] += lineHeight, line;
9638
+ if ("left" === textAlign || "start" === textAlign ? line.leftOffset = 0 : "center" === textAlign ? line.leftOffset = (bbox.width - line.width) / 2 : "right" !== textAlign && "end" !== textAlign || (line.leftOffset = bbox.width - line.width), line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 + origin[1], !line.keepCenterInLine) {
9639
+ const buf = 0,
9640
+ actualHeightWithBuf = line.ascent + line.descent + buf;
9641
+ if (actualHeightWithBuf < lineHeight - buf && ("bottom" === textBaseline ? line.topOffset += (lineHeight - actualHeightWithBuf) / 2 : "top" === textBaseline && (line.topOffset -= (lineHeight - actualHeightWithBuf) / 2)), "alphabetic" === textBaseline) {
9642
+ const ratio = lineHeight / (line.ascent + line.descent);
9643
+ line.topOffset = lineHeight / 2 + (line.ascent - line.descent) / 2 * ratio + origin[1];
9644
+ }
9645
+ }
9646
+ return origin[1] += lineHeight, line;
9637
9647
  }
9638
9648
  }
9639
9649
 
@@ -9748,7 +9758,7 @@ class Text extends Graphic {
9748
9758
  updateSingallineAABBBounds(text) {
9749
9759
  this.updateMultilineAABBBounds([text]);
9750
9760
  const layoutData = this.cache.layoutData;
9751
- if (layoutData) {
9761
+ if (layoutData && layoutData.lines && layoutData.lines.length) {
9752
9762
  const line = layoutData.lines[0];
9753
9763
  this.cache.clipedText = line.str, this.cache.clipedWidth = line.width;
9754
9764
  }
@@ -9784,10 +9794,11 @@ class Text extends Graphic {
9784
9794
  lineWidth = textTheme.lineWidth,
9785
9795
  whiteSpace = textTheme.whiteSpace,
9786
9796
  suffixPosition = textTheme.suffixPosition,
9787
- ignoreBuf = textTheme.ignoreBuf
9797
+ ignoreBuf = textTheme.ignoreBuf,
9798
+ keepCenterInLine = textTheme.keepCenterInLine
9788
9799
  } = attribute,
9789
9800
  buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize),
9790
- lineHeight = this.getLineHeight(attribute, textTheme) + buf;
9801
+ lineHeight = this.getLineHeight(attribute, textTheme, buf);
9791
9802
  if ("normal" === whiteSpace || wrap) return this.updateWrapAABBBounds(text);
9792
9803
  if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
9793
9804
  const bbox = this.cache.layoutData.bbox;
@@ -9802,7 +9813,8 @@ class Text extends Graphic {
9802
9813
  }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, {
9803
9814
  lineWidth: maxLineWidth,
9804
9815
  suffixPosition: suffixPosition,
9805
- measureMode: measureMode
9816
+ measureMode: measureMode,
9817
+ keepCenterInLine: keepCenterInLine
9806
9818
  }),
9807
9819
  {
9808
9820
  bbox: bbox
@@ -9827,10 +9839,11 @@ class Text extends Graphic {
9827
9839
  measureMode = textTheme.measureMode,
9828
9840
  suffixPosition = textTheme.suffixPosition,
9829
9841
  heightLimit = 0,
9830
- lineClamp: lineClamp
9842
+ lineClamp: lineClamp,
9843
+ keepCenterInLine = textTheme.keepCenterInLine
9831
9844
  } = this.attribute,
9832
9845
  buf = ignoreBuf ? 0 : this.guessLineHeightBuf(fontSize),
9833
- lineHeight = this.getLineHeight(this.attribute, textTheme) + buf;
9846
+ lineHeight = this.getLineHeight(this.attribute, textTheme, buf);
9834
9847
  if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
9835
9848
  const bbox = this.cache.layoutData.bbox;
9836
9849
  return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
@@ -9858,7 +9871,8 @@ class Text extends Graphic {
9858
9871
  str: clip.str,
9859
9872
  width: clip.width,
9860
9873
  ascent: matrics.ascent,
9861
- descent: matrics.descent
9874
+ descent: matrics.descent,
9875
+ keepCenterInLine: keepCenterInLine
9862
9876
  });
9863
9877
  break;
9864
9878
  }
@@ -9875,7 +9889,8 @@ class Text extends Graphic {
9875
9889
  str: clip.str,
9876
9890
  width: clip.width,
9877
9891
  ascent: matrics.ascent,
9878
- descent: matrics.descent
9892
+ descent: matrics.descent,
9893
+ keepCenterInLine: keepCenterInLine
9879
9894
  });
9880
9895
  let cutLength = clip.str.length;
9881
9896
  if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
@@ -9899,7 +9914,8 @@ class Text extends Graphic {
9899
9914
  str: clip.str,
9900
9915
  width: clip.width,
9901
9916
  ascent: matrics.ascent,
9902
- descent: matrics.descent
9917
+ descent: matrics.descent,
9918
+ keepCenterInLine: keepCenterInLine
9903
9919
  }), lineWidth = Math.max(lineWidth, clip.width);
9904
9920
  break;
9905
9921
  }
@@ -9909,7 +9925,8 @@ class Text extends Graphic {
9909
9925
  str: text,
9910
9926
  width: width,
9911
9927
  ascent: matrics.ascent,
9912
- descent: matrics.descent
9928
+ descent: matrics.descent,
9929
+ keepCenterInLine: keepCenterInLine
9913
9930
  });
9914
9931
  }
9915
9932
  bboxWH[0] = lineWidth;
@@ -9942,7 +9959,7 @@ class Text extends Graphic {
9942
9959
  verticalMode = textTheme.verticalMode,
9943
9960
  suffixPosition = textTheme.suffixPosition
9944
9961
  } = attribute,
9945
- lineHeight = this.getLineHeight(attribute, textTheme);
9962
+ lineHeight = this.getLineHeight(attribute, textTheme, 0);
9946
9963
  let {
9947
9964
  textAlign = textTheme.textAlign,
9948
9965
  textBaseline = textTheme.textBaseline
@@ -10002,9 +10019,9 @@ class Text extends Graphic {
10002
10019
  const attribute = this.attribute;
10003
10020
  return null !== (_b = null !== (_a = attribute.maxLineWidth) && void 0 !== _a ? _a : attribute.maxWidth) && void 0 !== _b ? _b : theme.maxWidth;
10004
10021
  }
10005
- getLineHeight(attribute, textTheme) {
10022
+ getLineHeight(attribute, textTheme, buf) {
10006
10023
  var _a;
10007
- return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
10024
+ return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
10008
10025
  }
10009
10026
  needUpdateTags(keys) {
10010
10027
  let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
@@ -10106,7 +10123,8 @@ class WrapText extends Text {
10106
10123
  str: clip.str,
10107
10124
  width: clip.width,
10108
10125
  ascent: 0,
10109
- descent: 0
10126
+ descent: 0,
10127
+ keepCenterInLine: !1
10110
10128
  });
10111
10129
  break;
10112
10130
  }
@@ -10122,7 +10140,8 @@ class WrapText extends Text {
10122
10140
  str: clip.str,
10123
10141
  width: clip.width,
10124
10142
  ascent: 0,
10125
- descent: 0
10143
+ descent: 0,
10144
+ keepCenterInLine: !1
10126
10145
  }), clip.str.length === str.length) ;else if (needCut) {
10127
10146
  const newStr = str.substring(clip.str.length);
10128
10147
  lines.splice(i + 1, 0, newStr);
@@ -10143,7 +10162,8 @@ class WrapText extends Text {
10143
10162
  str: clip.str,
10144
10163
  width: clip.width,
10145
10164
  ascent: 0,
10146
- descent: 0
10165
+ descent: 0,
10166
+ keepCenterInLine: !1
10147
10167
  }), lineWidth = Math.max(lineWidth, clip.width);
10148
10168
  break;
10149
10169
  }
@@ -10151,7 +10171,8 @@ class WrapText extends Text {
10151
10171
  str: text,
10152
10172
  width: width,
10153
10173
  ascent: 0,
10154
- descent: 0
10174
+ descent: 0,
10175
+ keepCenterInLine: !1
10155
10176
  });
10156
10177
  }
10157
10178
  bboxWH[0] = lineWidth;
@@ -29920,6 +29941,6 @@ EmptyTip.defaultAttributes = {
29920
29941
  }
29921
29942
  };
29922
29943
 
29923
- const version = "0.21.0-alpha.10";
29944
+ const version = "0.21.0-alpha.12";
29924
29945
 
29925
29946
  export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.21.0-alpha.10";
1
+ export declare const version = "0.21.0-alpha.12";
2
2
  export * from './core/base';
3
3
  export * from './core/type';
4
4
  export * from './scrollbar';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.21.0-alpha.10";
1
+ export const version = "0.21.0-alpha.12";
2
2
 
3
3
  export * from "./core/base";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.21.0-alpha.10\";\n\nexport * from './core/base';\nexport * from './core/type';\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 './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.21.0-alpha.12\";\n\nexport * from './core/base';\nexport * from './core/type';\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 './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
@@ -1,4 +1,4 @@
1
1
  export * from "./indicator";
2
2
 
3
3
  export * from "./type";
4
- //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -98,4 +98,4 @@ export class Indicator extends AbstractComponent {
98
98
  }));
99
99
  }
100
100
  }
101
- //# sourceMappingURL=indicator.js.map
101
+ //# sourceMappingURL=indicator.js.map
@@ -3,4 +3,4 @@ import { registerGroup, registerRichtext, registerText } from "@visactor/vrender
3
3
  export function loadIndicatorComponent() {
4
4
  registerGroup(), registerText(), registerRichtext();
5
5
  }
6
- //# sourceMappingURL=register.js.map
6
+ //# sourceMappingURL=register.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=type.js.map
2
+ //# sourceMappingURL=type.js.map
package/es/label/arc.js CHANGED
@@ -494,5 +494,4 @@ ArcLabel.defaultAttributes = {
494
494
 
495
495
  export const registerArcDataLabel = () => {
496
496
  registerLabelComponent("arc", ArcLabel);
497
- };
498
- //# sourceMappingURL=arc.js.map
497
+ };
package/es/label/line.js CHANGED
@@ -54,4 +54,5 @@ LineLabel.defaultAttributes = {
54
54
 
55
55
  export const registerLineDataLabel = () => {
56
56
  registerLabelComponent("line", LineLabel), registerLabelComponent("area", LineLabel);
57
- };
57
+ };
58
+ //# sourceMappingURL=line.js.map
@@ -3,4 +3,4 @@ import { registerGroup, registerLine, registerRichtext, registerText } from "@vi
3
3
  export function loadLabelComponent() {
4
4
  registerGroup(), registerText(), registerRichtext(), registerLine();
5
5
  }
6
- //# sourceMappingURL=register.js.map
6
+ //# sourceMappingURL=register.js.map
@@ -39,4 +39,4 @@ SymbolLabel.defaultAttributes = {
39
39
  export const registerSymbolDataLabel = () => {
40
40
  registerLabelComponent("symbol", SymbolLabel), registerLabelComponent("line-data", SymbolLabel);
41
41
  };
42
- //# sourceMappingURL=symbol.js.map
42
+ //# sourceMappingURL=symbol.js.map
package/es/label/type.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=type.js.map
2
+ //# sourceMappingURL=type.js.map
package/es/label/util.js CHANGED
@@ -158,4 +158,4 @@ function getIntersection(dx, dy, cx, cy, w, h) {
158
158
  export function getAlignOffset(align) {
159
159
  return "left" === align ? 0 : "right" === align ? 1 : .5;
160
160
  }
161
- //# sourceMappingURL=util.js.map
161
+ //# sourceMappingURL=util.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-components",
3
- "version": "0.21.0-alpha.10",
3
+ "version": "0.21.0-alpha.12",
4
4
  "description": "components library for dp visualization",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index.js",
@@ -14,8 +14,8 @@
14
14
  "dependencies": {
15
15
  "@visactor/vutils": "~0.19.1",
16
16
  "@visactor/vscale": "~0.19.1",
17
- "@visactor/vrender-core": "0.21.0-alpha.10",
18
- "@visactor/vrender-kits": "0.21.0-alpha.10"
17
+ "@visactor/vrender-core": "0.21.0-alpha.12",
18
+ "@visactor/vrender-kits": "0.21.0-alpha.12"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rushstack/eslint-patch": "~1.1.4",