@visactor/vrender-components 0.16.1-alpha.0 → 0.16.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.
Files changed (69) hide show
  1. package/cjs/core/base.js +1 -1
  2. package/cjs/core/base.js.map +1 -1
  3. package/cjs/data-zoom/data-zoom.js +7 -4
  4. package/cjs/data-zoom/data-zoom.js.map +1 -1
  5. package/cjs/index.d.ts +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/label/arc.d.ts +1 -2
  9. package/cjs/label/arc.js +2 -14
  10. package/cjs/label/arc.js.map +1 -1
  11. package/cjs/label/base.d.ts +4 -1
  12. package/cjs/label/base.js +19 -4
  13. package/cjs/label/base.js.map +1 -1
  14. package/cjs/label/type.d.ts +3 -0
  15. package/cjs/label/type.js.map +1 -1
  16. package/cjs/marker/area.d.ts +1 -4
  17. package/cjs/marker/area.js +0 -6
  18. package/cjs/marker/area.js.map +1 -1
  19. package/cjs/marker/line.d.ts +0 -4
  20. package/cjs/marker/line.js +0 -6
  21. package/cjs/marker/line.js.map +1 -1
  22. package/cjs/marker/point.d.ts +2 -2
  23. package/cjs/marker/point.js.map +1 -1
  24. package/cjs/marker/type.d.ts +2 -2
  25. package/cjs/marker/type.js.map +1 -1
  26. package/cjs/scrollbar/scrollbar.js +5 -3
  27. package/cjs/scrollbar/scrollbar.js.map +1 -1
  28. package/cjs/segment/segment.js +2 -3
  29. package/cjs/segment/segment.js.map +1 -1
  30. package/cjs/segment/type.d.ts +2 -6
  31. package/cjs/segment/type.js.map +1 -1
  32. package/cjs/slider/slider.js +17 -10
  33. package/cjs/slider/slider.js.map +1 -1
  34. package/dist/index.js +122 -81
  35. package/dist/index.min.js +1 -1
  36. package/es/core/base.js +1 -1
  37. package/es/core/base.js.map +1 -1
  38. package/es/data-zoom/data-zoom.js +6 -3
  39. package/es/data-zoom/data-zoom.js.map +1 -1
  40. package/es/index.d.ts +1 -1
  41. package/es/index.js +1 -1
  42. package/es/index.js.map +1 -1
  43. package/es/label/arc.d.ts +1 -2
  44. package/es/label/arc.js +2 -14
  45. package/es/label/arc.js.map +1 -1
  46. package/es/label/base.d.ts +4 -1
  47. package/es/label/base.js +19 -4
  48. package/es/label/base.js.map +1 -1
  49. package/es/label/type.d.ts +3 -0
  50. package/es/label/type.js.map +1 -1
  51. package/es/marker/area.d.ts +1 -4
  52. package/es/marker/area.js +0 -6
  53. package/es/marker/area.js.map +1 -1
  54. package/es/marker/line.d.ts +0 -4
  55. package/es/marker/line.js +0 -6
  56. package/es/marker/line.js.map +1 -1
  57. package/es/marker/point.d.ts +2 -2
  58. package/es/marker/point.js.map +1 -1
  59. package/es/marker/type.d.ts +2 -2
  60. package/es/marker/type.js.map +1 -1
  61. package/es/scrollbar/scrollbar.js +5 -3
  62. package/es/scrollbar/scrollbar.js.map +1 -1
  63. package/es/segment/segment.js +3 -4
  64. package/es/segment/segment.js.map +1 -1
  65. package/es/segment/type.d.ts +2 -6
  66. package/es/segment/type.js.map +1 -1
  67. package/es/slider/slider.js +17 -10
  68. package/es/slider/slider.js.map +1 -1
  69. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -4684,7 +4684,7 @@
4684
4684
  function applyStrokeStyle(ctx, character) {
4685
4685
  var strokeStyle = character && character.stroke || defaultFormatting.stroke;
4686
4686
  if (!strokeStyle) return void (ctx.globalAlpha = 0);
4687
- ctx.globalAlpha = 1, ctx.lineWidth = 1, ctx.strokeStyle = strokeStyle;
4687
+ ctx.globalAlpha = 1, ctx.lineWidth = character && "number" == typeof character.lineHeight ? character.lineHeight : 1, ctx.strokeStyle = strokeStyle;
4688
4688
  var fontSize = character.fontSize || 16;
4689
4689
  switch (character.script) {
4690
4690
  case "super":
@@ -5887,7 +5887,7 @@
5887
5887
  }, {
5888
5888
  key: "stopPropagation",
5889
5889
  value: function stopPropagation() {
5890
- this.propagationStopped = !0;
5890
+ this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.stopPropagation(), this.propagationStopped = !0;
5891
5891
  }
5892
5892
  }, {
5893
5893
  key: "initEvent",
@@ -6563,7 +6563,7 @@
6563
6563
  void 0 === step.props[k] && (step.props[k] = _this7.target.getDefaultAttribute(k));
6564
6564
  }); lastStep.prev;) lastStep.props && (lastStep.propKeys || (lastStep.propKeys = Object.keys(lastStep.props)), lastStep.propKeys.forEach(function (key) {
6565
6565
  void 0 === _props[key] && (_props[key] = lastStep.props[key]);
6566
- })), lastStep = lastStep.prev;
6566
+ })), step.propKeys = Object.keys(step.props), lastStep = lastStep.prev;
6567
6567
  var initProps = this.stepHead.props;
6568
6568
  step.propKeys || (step.propKeys = Object.keys(_props)), step.propKeys.forEach(function (key) {
6569
6569
  if (void 0 === initProps[key]) {
@@ -7490,7 +7490,7 @@
7490
7490
  }, {
7491
7491
  key: "clearStates",
7492
7492
  value: function clearStates(hasAnimation) {
7493
- this.hasState() && this.normalAttrs && this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0), this.normalAttrs = null, this.currentStates = [];
7493
+ this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
7494
7494
  }
7495
7495
  }, {
7496
7496
  key: "removeState",
@@ -11403,9 +11403,7 @@
11403
11403
  _classCallCheck(this, Line);
11404
11404
  this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(function (p) {
11405
11405
  return p;
11406
- }), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY[this.direction];
11407
- var directionKey = this.directionKey;
11408
- this.actualWidth = 0;
11406
+ }), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY[this.direction], this.actualWidth = 0;
11409
11407
  var maxHeight = 0;
11410
11408
  this.paragraphs.forEach(function (word, index) {
11411
11409
  if (0 === index && word instanceof Paragraph) {
@@ -11413,24 +11411,30 @@
11413
11411
  0 !== (null == result ? void 0 : result.index) && (word.text = word.text.slice(null == result ? void 0 : result.index), word.updateWidth());
11414
11412
  }
11415
11413
  _this.actualWidth += word[_this.directionKey.width], maxHeight = Math.max(word[_this.directionKey.height], maxHeight);
11416
- }), this.height = maxHeight, this.blankWidth = isWidthMax ? 0 : this.width - this.actualWidth;
11417
- var x = this.left,
11418
- spacing = 0;
11419
- if (this.actualWidth < width && !isWidthMax) switch (this.textAlign) {
11420
- case "right":
11421
- x = width - this.actualWidth;
11422
- break;
11423
- case "center":
11424
- x = (width - this.actualWidth) / 2;
11425
- break;
11426
- case "justify":
11427
- this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1);
11428
- }
11429
- this.paragraphs.map(function (paragraph) {
11430
- paragraph instanceof RichTextIcon ? (paragraph["_" + directionKey.x] = x, x += paragraph[directionKey.width] + spacing, paragraph["_" + directionKey.y] = "top" === paragraph.attribute.textBaseline ? 0 : "bottom" === paragraph.attribute.textBaseline ? maxHeight - paragraph.height : (maxHeight - paragraph.height) / 2) : (paragraph[directionKey.left] = x, x += paragraph[directionKey.width] + spacing);
11431
- });
11414
+ }), this.height = maxHeight, this.blankWidth = isWidthMax ? 0 : this.width - this.actualWidth, this.calcOffset(width, isWidthMax);
11432
11415
  }
11433
11416
  _createClass(Line, [{
11417
+ key: "calcOffset",
11418
+ value: function calcOffset(width, isWidthMax) {
11419
+ var directionKey = this.directionKey,
11420
+ maxHeight = this.height;
11421
+ var x = this.left,
11422
+ spacing = 0;
11423
+ if (this.actualWidth < width && !isWidthMax) switch (this.textAlign) {
11424
+ case "right":
11425
+ x = width - this.actualWidth;
11426
+ break;
11427
+ case "center":
11428
+ x = (width - this.actualWidth) / 2;
11429
+ break;
11430
+ case "justify":
11431
+ this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1);
11432
+ }
11433
+ this.paragraphs.map(function (paragraph) {
11434
+ paragraph instanceof RichTextIcon ? (paragraph["_" + directionKey.x] = x, x += paragraph[directionKey.width] + spacing, paragraph["_" + directionKey.y] = "top" === paragraph.attribute.textBaseline ? 0 : "bottom" === paragraph.attribute.textBaseline ? maxHeight - paragraph.height : (maxHeight - paragraph.height) / 2) : (paragraph[directionKey.left] = x, x += paragraph[directionKey.width] + spacing);
11435
+ });
11436
+ }
11437
+ }, {
11434
11438
  key: "draw",
11435
11439
  value: function draw(ctx, lastLine, x, y, drawIcon) {
11436
11440
  var _this2 = this;
@@ -11710,10 +11714,22 @@
11710
11714
  var textParts = textConfig[i].text.split("\n");
11711
11715
  for (var j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, textConfig[i]));
11712
11716
  } else paragraphs.push(new Paragraph(textConfig[i].text, !1, textConfig[i]));
11713
- var frame = new Frame(0, 0, ("number" == typeof maxWidth && (!width || width > maxWidth) ? maxWidth : width) || 0, ("number" == typeof maxHeight && (!height || height > maxHeight) ? maxHeight : height) || 0, ellipsis, wordBreak, verticalDirection, textAlign, textBaseline, layoutDirection || "horizontal", "number" == typeof maxWidth && (!width || width > maxWidth), "number" == typeof maxHeight && (!height || height > maxHeight), singleLine || !1, null === (_a = this._frameCache) || void 0 === _a ? void 0 : _a.icons),
11717
+ var maxWidthFinite = "number" == typeof maxWidth && Number.isFinite(maxWidth) && maxWidth > 0,
11718
+ maxHeightFinite = "number" == typeof maxHeight && Number.isFinite(maxHeight) && maxHeight > 0,
11719
+ richTextWidthEnable = "number" == typeof width && Number.isFinite(width) && width > 0 && (!maxWidthFinite || width <= maxWidth),
11720
+ richTextHeightEnable = "number" == typeof height && Number.isFinite(height) && height > 0 && (!maxHeightFinite || height <= maxHeight),
11721
+ frame = new Frame(0, 0, (richTextWidthEnable ? width : maxWidthFinite ? maxWidth : 0) || 0, (richTextHeightEnable ? height : maxHeightFinite ? maxHeight : 0) || 0, ellipsis, wordBreak, verticalDirection, textAlign, textBaseline, layoutDirection || "horizontal", !richTextWidthEnable && maxWidthFinite, !richTextHeightEnable && maxHeightFinite, singleLine || !1, null === (_a = this._frameCache) || void 0 === _a ? void 0 : _a.icons),
11714
11722
  wrapper = new Wrapper(frame);
11715
11723
  for (var _i = 0; _i < paragraphs.length; _i++) wrapper.deal(paragraphs[_i]);
11716
- wrapper.send(), this._frameCache = frame;
11724
+ wrapper.send();
11725
+ if (!("horizontal" === frame.layoutDirection ? richTextWidthEnable : richTextHeightEnable)) {
11726
+ var frameSize = frame.getActualSizeWidthEllipsis();
11727
+ var offsetSize = "horizontal" === frame.layoutDirection ? frameSize.width : frameSize.height;
11728
+ ("horizontal" === frame.layoutDirection ? maxWidthFinite : maxHeightFinite) && (offsetSize = Math.min(offsetSize, "horizontal" === frame.layoutDirection ? maxWidth : maxHeight)), frame.lines.forEach(function (l) {
11729
+ l.calcOffset(offsetSize, !1);
11730
+ });
11731
+ }
11732
+ this._frameCache = frame;
11717
11733
  }
11718
11734
  }, {
11719
11735
  key: "clone",
@@ -16788,7 +16804,7 @@
16788
16804
  value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
16789
16805
  if (!graphic.attribute._debug_bounds) return !1;
16790
16806
  var context = drawContext.context;
16791
- context.highPerformanceSave(), context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0);
16807
+ context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
16792
16808
  var b = graphic.AABBBounds;
16793
16809
  return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
16794
16810
  }
@@ -18021,35 +18037,36 @@
18021
18037
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
18022
18038
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18023
18039
  };
18024
- var DefaultCanvasGlyphRender = /*#__PURE__*/function (_BaseRender) {
18025
- _inherits(DefaultCanvasGlyphRender, _BaseRender);
18026
- var _super = _createSuper(DefaultCanvasGlyphRender);
18040
+ var DefaultCanvasGlyphRender = /*#__PURE__*/function () {
18027
18041
  function DefaultCanvasGlyphRender() {
18028
- var _this;
18029
18042
  _classCallCheck(this, DefaultCanvasGlyphRender);
18030
- _this = _super.apply(this, arguments), _this.numberType = GLYPH_NUMBER_TYPE;
18031
- return _this;
18043
+ this.numberType = GLYPH_NUMBER_TYPE;
18032
18044
  }
18033
18045
  _createClass(DefaultCanvasGlyphRender, [{
18034
18046
  key: "drawShape",
18035
18047
  value: function drawShape(glyph, context, x, y, drawContext, params, fillCb, strokeCb) {
18048
+ drawContext.drawContribution && glyph.getSubGraphic().forEach(function (item) {
18049
+ var renderer = drawContext.drawContribution.getRenderContribution(item);
18050
+ renderer && renderer.drawShape && renderer.drawShape(item, context, x, y, drawContext, params, fillCb, strokeCb);
18051
+ });
18052
+ }
18053
+ }, {
18054
+ key: "draw",
18055
+ value: function draw(glyph, renderService, drawContext, params) {
18056
+ var context = drawContext.context;
18057
+ if (!context) return;
18058
+ if (context.highPerformanceSave(), !drawContext.drawContribution) return;
18036
18059
  var glyphTheme = getTheme(glyph),
18037
18060
  subGraphic = glyph.getSubGraphic();
18038
18061
  subGraphic.length && subGraphic.forEach(function (g) {
18039
18062
  drawContext.drawContribution.renderItem(g, drawContext, {
18040
18063
  theme: glyphTheme
18041
18064
  });
18042
- });
18043
- }
18044
- }, {
18045
- key: "draw",
18046
- value: function draw(glyph, renderService, drawContext, params) {
18047
- var glyphAttr = getTheme(glyph).glyph;
18048
- this._draw(glyph, glyphAttr, !1, drawContext, params);
18065
+ }), context.highPerformanceRestore();
18049
18066
  }
18050
18067
  }]);
18051
18068
  return DefaultCanvasGlyphRender;
18052
- }(BaseRender);
18069
+ }();
18053
18070
  DefaultCanvasGlyphRender = __decorate$6([injectable()], DefaultCanvasGlyphRender);
18054
18071
 
18055
18072
  var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -18484,8 +18501,7 @@
18484
18501
  'clip',
18485
18502
  'pickable',
18486
18503
  'childrenPickable',
18487
- 'zIndex',
18488
- 'cursor'
18504
+ 'zIndex'
18489
18505
  ];
18490
18506
  class AbstractComponent extends Group {
18491
18507
  constructor(attributes, mode = '2d') {
@@ -18592,11 +18608,11 @@
18592
18608
  const { direction } = this.attribute;
18593
18609
  this._prePos = direction === 'horizontal' ? e.clientX : e.clientY;
18594
18610
  if (vglobal.env === 'browser') {
18595
- vglobal.addEventListener('pointermove', this._onSliderPointerMove);
18611
+ vglobal.addEventListener('pointermove', this._onSliderPointerMove, { capture: true });
18596
18612
  vglobal.addEventListener('pointerup', this._onSliderPointerUp);
18597
18613
  }
18598
18614
  else {
18599
- this._slider.addEventListener('pointermove', this._onSliderPointerMove);
18615
+ this._slider.addEventListener('pointermove', this._onSliderPointerMove, { capture: true });
18600
18616
  this._slider.addEventListener('pointerup', this._onSliderPointerUp);
18601
18617
  this._slider.addEventListener('pointerupoutside', this._onSliderPointerUp);
18602
18618
  }
@@ -20302,6 +20318,21 @@
20302
20318
  this._lastSelect = target;
20303
20319
  }
20304
20320
  };
20321
+ this._handleRelatedGraphicSetState = (e) => {
20322
+ var _a, _b, _c;
20323
+ if (((_a = e.detail) === null || _a === void 0 ? void 0 : _a.type) === AttributeUpdateType.STATE) {
20324
+ const currentStates = (_c = (_b = e.target) === null || _b === void 0 ? void 0 : _b.currentStates) !== null && _c !== void 0 ? _c : [];
20325
+ const label = this._graphicToText.get(e.target);
20326
+ if (label) {
20327
+ if (label.text) {
20328
+ label.text.useStates(currentStates);
20329
+ }
20330
+ if (label.labelLine) {
20331
+ label.labelLine.useStates(currentStates);
20332
+ }
20333
+ }
20334
+ }
20335
+ };
20305
20336
  }
20306
20337
  labeling(textBounds, graphicBounds, position, offset) {
20307
20338
  return;
@@ -20352,7 +20383,7 @@
20352
20383
  target.addEventListener('pointerdown', this._onClick);
20353
20384
  }
20354
20385
  }
20355
- _setStates(target) {
20386
+ _setStatesOfText(target) {
20356
20387
  if (!target) {
20357
20388
  return;
20358
20389
  }
@@ -20362,10 +20393,20 @@
20362
20393
  }
20363
20394
  target.states = state;
20364
20395
  }
20396
+ _setStatesOfLabelLine(target) {
20397
+ if (!target) {
20398
+ return;
20399
+ }
20400
+ const state = this.attribute.labelLineState;
20401
+ if (!state || vutils.isEmpty(state)) {
20402
+ return;
20403
+ }
20404
+ target.states = state;
20405
+ }
20365
20406
  _createLabelText(attributes) {
20366
20407
  const text = createText(attributes);
20367
20408
  this._bindEvent(text);
20368
- this._setStates(text);
20409
+ this._setStatesOfText(text);
20369
20410
  return text;
20370
20411
  }
20371
20412
  _prepare() {
@@ -20561,7 +20602,11 @@
20561
20602
  if (relatedGraphic) {
20562
20603
  const { from, to } = getAnimationAttributes(text.attribute, 'fadeIn');
20563
20604
  this.add(text);
20564
- labelLine && this.add(labelLine);
20605
+ if (labelLine) {
20606
+ this._setStatesOfLabelLine(labelLine);
20607
+ this.add(labelLine);
20608
+ }
20609
+ this._syncStateWithRelatedGraphic(relatedGraphic);
20565
20610
  relatedGraphic.once('animate-bind', () => {
20566
20611
  text.setAttributes(from);
20567
20612
  const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {
@@ -20621,6 +20666,7 @@
20621
20666
  if (labelLine) {
20622
20667
  this.add(labelLine);
20623
20668
  }
20669
+ this._syncStateWithRelatedGraphic(relatedGraphic);
20624
20670
  }
20625
20671
  else if (state === 'update') {
20626
20672
  const prevLabel = prevTextMap.get(relatedGraphic);
@@ -20640,6 +20686,11 @@
20640
20686
  });
20641
20687
  this._graphicToText = currentTextMap;
20642
20688
  }
20689
+ _syncStateWithRelatedGraphic(relatedGraphic) {
20690
+ if (this.attribute.syncState) {
20691
+ relatedGraphic.on('afterAttributeUpdate', this._handleRelatedGraphicSetState);
20692
+ }
20693
+ }
20643
20694
  _afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, { mode, duration, easing, to, delay }) {
20644
20695
  const listener = (event) => {
20645
20696
  var _a;
@@ -21169,8 +21220,9 @@
21169
21220
  maxRadius = currentMarks.attribute.outerRadius;
21170
21221
  }
21171
21222
  });
21172
- currentMarks.forEach((currentMark, index) => {
21223
+ data.forEach((d, index) => {
21173
21224
  var _a, _b;
21225
+ const currentMark = this._idToGraphic.get(d.id);
21174
21226
  const graphicAttribute = currentMark.attribute;
21175
21227
  const center = { x: (_a = graphicAttribute === null || graphicAttribute === void 0 ? void 0 : graphicAttribute.x) !== null && _a !== void 0 ? _a : 0, y: (_b = graphicAttribute === null || graphicAttribute === void 0 ? void 0 : graphicAttribute.y) !== null && _b !== void 0 ? _b : 0 };
21176
21228
  if (!vutils.isNil(data[index]) && !vutils.isNil(textBoundsArray[index])) {
@@ -21396,17 +21448,6 @@
21396
21448
  labelPosition.x = cx + alignOffset + flag * (spaceWidth + targetCenterOffset);
21397
21449
  }
21398
21450
  }
21399
- _computeAlignOffset(align, labelWidth, alignFlag) {
21400
- switch (align) {
21401
- case 'left':
21402
- return alignFlag < 0 ? -labelWidth : 0;
21403
- case 'right':
21404
- return alignFlag < 0 ? 0 : labelWidth;
21405
- case 'center':
21406
- default:
21407
- return (labelWidth / 2) * alignFlag;
21408
- }
21409
- }
21410
21451
  _computeAlign(arc, attribute) {
21411
21452
  var _a, _b, _c, _d, _e, _f;
21412
21453
  const labelConfig = attribute;
@@ -21945,7 +21986,7 @@
21945
21986
  });
21946
21987
  }
21947
21988
  else {
21948
- const line = createPolygon(Object.assign(Object.assign({ points: this._clipPoints(this.attribute.points) }, vutils.array(lineStyle)[0]), { fill: false, closePath: false }));
21989
+ const line = createLine(Object.assign(Object.assign({ points: this._clipPoints(this.attribute.points) }, vutils.array(lineStyle)[0]), { fill: false }));
21949
21990
  line.name = `${this.name}-line`;
21950
21991
  line.id = this._getNodeId('line');
21951
21992
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.line)) {
@@ -24275,10 +24316,14 @@
24275
24316
  this._selectedPreviewGroup.addEventListener('pointerdown', (e) => this._onHandlerPointerDown(e, selectedTag));
24276
24317
  }
24277
24318
  if (vglobal.env === 'browser') {
24278
- vglobal.addEventListener('pointermove', this._onHandlerPointerMove.bind(this));
24319
+ vglobal.addEventListener('pointermove', this._onHandlerPointerMove.bind(this), {
24320
+ capture: true
24321
+ });
24279
24322
  vglobal.addEventListener('pointerup', this._onHandlerPointerUp.bind(this));
24280
24323
  }
24281
- this.addEventListener('pointermove', this._onHandlerPointerMove);
24324
+ this.addEventListener('pointermove', this._onHandlerPointerMove, {
24325
+ capture: true
24326
+ });
24282
24327
  this.addEventListener('pointerup', this._onHandlerPointerUp);
24283
24328
  this.addEventListener('pointerupoutside', this._onHandlerPointerUp);
24284
24329
  if (showDetail === 'auto') {
@@ -25092,12 +25137,6 @@
25092
25137
  }
25093
25138
 
25094
25139
  class MarkLine extends Marker {
25095
- getLine() {
25096
- return this._line;
25097
- }
25098
- getLabel() {
25099
- return this._label;
25100
- }
25101
25140
  constructor(attributes) {
25102
25141
  super(vutils.merge({}, MarkLine.defaultAttributes, attributes));
25103
25142
  }
@@ -25178,12 +25217,6 @@
25178
25217
  MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
25179
25218
 
25180
25219
  class MarkArea extends Marker {
25181
- getArea() {
25182
- return this._area;
25183
- }
25184
- getLabel() {
25185
- return this._label;
25186
- }
25187
25220
  constructor(attributes) {
25188
25221
  super(vutils.merge({}, MarkArea.defaultAttributes, attributes));
25189
25222
  }
@@ -26461,11 +26494,13 @@
26461
26494
  this._currentHandler = e.target;
26462
26495
  this._prePos = this._isHorizontal ? e.clientX : e.clientY;
26463
26496
  if (vglobal.env === 'browser') {
26464
- vglobal.addEventListener('pointermove', this._onHandlerPointerMove);
26497
+ vglobal.addEventListener('pointermove', this._onHandlerPointerMove, {
26498
+ capture: true
26499
+ });
26465
26500
  vglobal.addEventListener('pointerup', this._onHandlerPointerUp);
26466
26501
  }
26467
26502
  else {
26468
- this._currentHandler.addEventListener('pointermove', this._onHandlerPointerMove);
26503
+ this._currentHandler.addEventListener('pointermove', this._onHandlerPointerMove, { capture: true });
26469
26504
  this._currentHandler.addEventListener('pointerup', this._onHandlerPointerUp);
26470
26505
  this._currentHandler.addEventListener('pointerupoutside', this._onHandlerPointerUp);
26471
26506
  }
@@ -26509,12 +26544,14 @@
26509
26544
  e.preventDefault();
26510
26545
  this._currentHandler = null;
26511
26546
  if (vglobal.env === 'browser') {
26512
- vglobal.removeEventListener('pointermove', this._onHandlerPointerMove);
26547
+ vglobal.removeEventListener('pointermove', this._onHandlerPointerMove, {
26548
+ capture: true
26549
+ });
26513
26550
  vglobal.removeEventListener('pointerup', this._onHandlerPointerUp);
26514
26551
  }
26515
26552
  else {
26516
26553
  const currentTarget = e.target;
26517
- currentTarget.removeEventListener('pointermove', this._onHandlerPointerMove);
26554
+ currentTarget.removeEventListener('pointermove', this._onHandlerPointerMove, { capture: true });
26518
26555
  currentTarget.removeEventListener('pointerup', this._onHandlerPointerUp);
26519
26556
  currentTarget.removeEventListener('pointerupoutside', this._onHandlerPointerUp);
26520
26557
  }
@@ -26523,11 +26560,15 @@
26523
26560
  e.stopPropagation();
26524
26561
  this._prePos = this._isHorizontal ? e.clientX : e.clientY;
26525
26562
  if (vglobal.env === 'browser') {
26526
- vglobal.addEventListener('pointermove', this._onTrackPointerMove);
26563
+ vglobal.addEventListener('pointermove', this._onTrackPointerMove, {
26564
+ capture: true
26565
+ });
26527
26566
  vglobal.addEventListener('pointerup', this._onTrackPointerUp);
26528
26567
  }
26529
26568
  else {
26530
- this._track.addEventListener('pointermove', this._onTrackPointerMove);
26569
+ this._track.addEventListener('pointermove', this._onTrackPointerMove, {
26570
+ capture: true
26571
+ });
26531
26572
  this._track.addEventListener('pointerup', this._onTrackPointerUp);
26532
26573
  this._track.addEventListener('pointerupoutside', this._onTrackPointerUp);
26533
26574
  }
@@ -29202,7 +29243,7 @@
29202
29243
  return new Tag(params ? params.attribute : {});
29203
29244
  }
29204
29245
 
29205
- const version = "0.16.1-alpha.0";
29246
+ const version = "0.16.1";
29206
29247
 
29207
29248
  exports.AbstractComponent = AbstractComponent;
29208
29249
  exports.ArcInfo = ArcInfo;