@visactor/vrender-components 0.17.10 → 0.17.11-alpha.2

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/dist/index.js CHANGED
@@ -24287,6 +24287,23 @@
24287
24287
  };
24288
24288
  loadDataZoomComponent();
24289
24289
  class DataZoom extends AbstractComponent {
24290
+ setPropsFromAttrs() {
24291
+ const { start, end, orient, previewData, previewPointsX, previewPointsY, previewPointsX1, previewPointsY1 } = this
24292
+ .attribute;
24293
+ start && (this.state.start = start);
24294
+ end && (this.state.end = end);
24295
+ const { width, height } = this.getLayoutAttrFromConfig();
24296
+ this._spanCache = this.state.end - this.state.start;
24297
+ this._isHorizontal = orient === 'top' || orient === 'bottom';
24298
+ this._layoutCache.max = this._isHorizontal ? width : height;
24299
+ this._layoutCache.attPos = this._isHorizontal ? 'x' : 'y';
24300
+ this._layoutCache.attSize = this._isHorizontal ? 'width' : 'height';
24301
+ previewData && (this._previewData = previewData);
24302
+ vutils.isFunction(previewPointsX) && (this._previewPointsX = previewPointsX);
24303
+ vutils.isFunction(previewPointsY) && (this._previewPointsY = previewPointsY);
24304
+ vutils.isFunction(previewPointsX1) && (this._previewPointsX1 = previewPointsX1);
24305
+ vutils.isFunction(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
24306
+ }
24290
24307
  constructor(attributes, options) {
24291
24308
  super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : vutils.merge({}, DataZoom.defaultAttributes, attributes));
24292
24309
  this.name = 'dataZoom';
@@ -24382,15 +24399,7 @@
24382
24399
  });
24383
24400
  }
24384
24401
  }, this.attribute.delayTime);
24385
- const { start, end, size, orient, showDetail, position, previewData, previewPointsX, previewPointsY, previewPointsX1, previewPointsY1, updateStateCallback } = this.attribute;
24386
- const { width, height } = size;
24387
- start && (this.state.start = start);
24388
- end && (this.state.end = end);
24389
- this._spanCache = this.state.end - this.state.start;
24390
- this._isHorizontal = orient === 'top' || orient === 'bottom';
24391
- this._layoutCache.max = this._isHorizontal ? width : height;
24392
- this._layoutCache.attPos = this._isHorizontal ? 'x' : 'y';
24393
- this._layoutCache.attSize = this._isHorizontal ? 'width' : 'height';
24402
+ const { position, showDetail } = attributes;
24394
24403
  this._activeCache.startPos = position;
24395
24404
  this._activeCache.lastPos = position;
24396
24405
  if (showDetail === 'auto') {
@@ -24399,11 +24408,11 @@
24399
24408
  else {
24400
24409
  this._showText = showDetail;
24401
24410
  }
24402
- previewData && (this._previewData = previewData);
24403
- vutils.isFunction(previewPointsX) && (this._previewPointsX = previewPointsX);
24404
- vutils.isFunction(previewPointsY) && (this._previewPointsY = previewPointsY);
24405
- vutils.isFunction(previewPointsX1) && (this._previewPointsX1 = previewPointsX1);
24406
- vutils.isFunction(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
24411
+ this.setPropsFromAttrs();
24412
+ }
24413
+ setAttributes(params, forceUpdateTag) {
24414
+ super.setAttributes(params, forceUpdateTag);
24415
+ this.setPropsFromAttrs();
24407
24416
  }
24408
24417
  bindEvents() {
24409
24418
  if (this.attribute.disableTriggerEvent) {
@@ -24551,66 +24560,126 @@
24551
24560
  0 }, dragMaskStyle), 'rect');
24552
24561
  }
24553
24562
  }
24563
+ isTextOverflow(componentBoundsLike, textPosition, textMeasure, textValue, layout) {
24564
+ const { width: textWidth, height: textHeight } = textMeasure.fullMeasure(textValue);
24565
+ if (this._isHorizontal) {
24566
+ if (layout === 'start') {
24567
+ const x1 = textPosition.x - textWidth;
24568
+ if (x1 < componentBoundsLike.x1) {
24569
+ return true;
24570
+ }
24571
+ }
24572
+ else {
24573
+ const x2 = textPosition.x + textWidth;
24574
+ if (x2 > componentBoundsLike.x2) {
24575
+ return true;
24576
+ }
24577
+ }
24578
+ }
24579
+ else {
24580
+ if (layout === 'start') {
24581
+ const y1 = textPosition.y - textHeight;
24582
+ if (y1 < componentBoundsLike.y1) {
24583
+ return true;
24584
+ }
24585
+ }
24586
+ else {
24587
+ const y2 = textPosition.y + textHeight;
24588
+ if (y2 > componentBoundsLike.y2) {
24589
+ return true;
24590
+ }
24591
+ }
24592
+ }
24593
+ return false;
24594
+ }
24554
24595
  renderText() {
24555
24596
  const { startTextStyle, endTextStyle } = this.attribute;
24556
- const { formatMethod: startTextFormat } = startTextStyle, restStartStyle = __rest(startTextStyle, ["formatMethod"]);
24597
+ const { formatMethod: startTextFormat } = startTextStyle, restStartTextStyle = __rest(startTextStyle, ["formatMethod"]);
24557
24598
  const { formatMethod: endTextFormat } = endTextStyle, restEndTextStyle = __rest(endTextStyle, ["formatMethod"]);
24558
24599
  const { start, end } = this.state;
24559
24600
  this._startValue = this._statePointToData(start);
24560
24601
  this._endValue = this._statePointToData(end);
24561
24602
  const { position, width, height } = this.getLayoutAttrFromConfig();
24603
+ const startTextValue = startTextFormat ? startTextFormat(this._startValue) : this._startValue;
24604
+ const endTextValue = endTextFormat ? endTextFormat(this._endValue) : this._endValue;
24605
+ const startTextMeasure = new vutils.TextMeasure({
24606
+ defaultFontParams: restStartTextStyle.textStyle
24607
+ });
24608
+ const endTextMeasure = new vutils.TextMeasure({
24609
+ defaultFontParams: restEndTextStyle.textStyle
24610
+ });
24611
+ const componentBoundsLike = {
24612
+ x1: position.x,
24613
+ y1: position.y,
24614
+ x2: position.x + width,
24615
+ y2: position.y + height
24616
+ };
24617
+ let startTextPosition;
24618
+ let endTextPosition;
24619
+ let startTextAlignStyle;
24620
+ let endTextAlignStyle;
24562
24621
  if (this._isHorizontal) {
24563
- this._startText = this.maybeAddLabel(this._container, vutils.merge({}, restStartStyle, {
24564
- text: startTextFormat ? startTextFormat(this._startValue) : this._startValue,
24622
+ startTextPosition = {
24565
24623
  x: position.x + start * width,
24566
- y: position.y + height / 2,
24567
- visible: this._showText,
24568
- pickable: false,
24569
- childrenPickable: false,
24570
- textStyle: {
24571
- textAlign: 'right',
24572
- textBaseline: 'middle'
24573
- }
24574
- }), `data-zoom-start-text-${position}`);
24575
- this._endText = this.maybeAddLabel(this._container, vutils.merge({}, restEndTextStyle, {
24576
- text: endTextFormat ? endTextFormat(this._endValue) : this._endValue,
24624
+ y: position.y + height / 2
24625
+ };
24626
+ endTextPosition = {
24577
24627
  x: position.x + end * width,
24578
- y: position.y + height / 2,
24579
- visible: this._showText,
24580
- pickable: false,
24581
- childrenPickable: false,
24582
- textStyle: {
24583
- textAlign: 'left',
24584
- textBaseline: 'middle'
24585
- }
24586
- }), `data-zoom-end-text-${position}`);
24628
+ y: position.y + height / 2
24629
+ };
24630
+ startTextAlignStyle = {
24631
+ textAlign: this.isTextOverflow(componentBoundsLike, startTextPosition, startTextMeasure, startTextValue, 'start')
24632
+ ? 'left'
24633
+ : 'right',
24634
+ textBaseline: 'middle'
24635
+ };
24636
+ endTextAlignStyle = {
24637
+ textAlign: this.isTextOverflow(componentBoundsLike, endTextPosition, endTextMeasure, endTextValue, 'end')
24638
+ ? 'right'
24639
+ : 'left',
24640
+ textBaseline: 'middle'
24641
+ };
24587
24642
  }
24588
24643
  else {
24589
- this._startText = this.maybeAddLabel(this._container, vutils.merge({}, restStartStyle, {
24590
- text: startTextFormat ? startTextFormat(this._startValue) : this._startValue,
24644
+ startTextPosition = {
24591
24645
  x: position.x + width / 2,
24592
- y: position.y + start * height,
24593
- visible: this._showText,
24594
- pickable: false,
24595
- childrenPickable: false,
24596
- textStyle: {
24597
- textAlign: 'center',
24598
- textBaseline: 'bottom'
24599
- }
24600
- }), `data-zoom-start-text-${position}`);
24601
- this._endText = this.maybeAddLabel(this._container, vutils.merge({}, restEndTextStyle, {
24602
- text: endTextFormat ? endTextFormat(this._endValue) : this._endValue,
24646
+ y: position.y + start * height
24647
+ };
24648
+ endTextPosition = {
24603
24649
  x: position.x + width / 2,
24604
- y: position.y + end * height,
24605
- visible: this._showText,
24606
- pickable: false,
24607
- childrenPickable: false,
24608
- textStyle: {
24609
- textAlign: 'center',
24610
- textBaseline: 'top'
24611
- }
24612
- }), `data-zoom-end-text-${position}`);
24650
+ y: position.y + end * height
24651
+ };
24652
+ startTextAlignStyle = {
24653
+ textAlign: 'center',
24654
+ textBaseline: this.isTextOverflow(componentBoundsLike, startTextPosition, startTextMeasure, startTextValue, 'start')
24655
+ ? 'top'
24656
+ : 'bottom'
24657
+ };
24658
+ endTextAlignStyle = {
24659
+ textAlign: 'center',
24660
+ textBaseline: this.isTextOverflow(componentBoundsLike, endTextPosition, endTextMeasure, endTextValue, 'end')
24661
+ ? 'bottom'
24662
+ : 'top'
24663
+ };
24613
24664
  }
24665
+ this._startText = this.maybeAddLabel(this._container, vutils.merge({}, restStartTextStyle, {
24666
+ text: startTextValue,
24667
+ x: startTextPosition.x,
24668
+ y: startTextPosition.y,
24669
+ visible: this._showText,
24670
+ pickable: false,
24671
+ childrenPickable: false,
24672
+ textStyle: startTextAlignStyle
24673
+ }), `data-zoom-start-text-${position}`);
24674
+ this._endText = this.maybeAddLabel(this._container, vutils.merge({}, restEndTextStyle, {
24675
+ text: endTextValue,
24676
+ x: endTextPosition.x,
24677
+ y: endTextPosition.y,
24678
+ visible: this._showText,
24679
+ pickable: false,
24680
+ childrenPickable: false,
24681
+ textStyle: endTextAlignStyle
24682
+ }), `data-zoom-end-text-${position}`);
24614
24683
  }
24615
24684
  getLayoutAttrFromConfig() {
24616
24685
  var _a, _b, _c, _d;
@@ -24674,23 +24743,23 @@
24674
24743
  render() {
24675
24744
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
24676
24745
  this._layoutAttrFromConfig = null;
24677
- const { orient, backgroundStyle, backgroundChartStyle = {}, selectedBackgroundStyle = {}, selectedBackgroundChartStyle = {}, middleHandlerStyle = {}, startHandlerStyle = {}, endHandlerStyle = {}, brushSelect } = this.attribute;
24746
+ const { orient, backgroundStyle, backgroundChartStyle = {}, selectedBackgroundStyle = {}, selectedBackgroundChartStyle = {}, middleHandlerStyle = {}, startHandlerStyle = {}, endHandlerStyle = {}, brushSelect, zoomLock } = this.attribute;
24678
24747
  const { start, end } = this.state;
24679
24748
  const { position, width, height } = this.getLayoutAttrFromConfig();
24680
24749
  const startHandlerMinSize = (_a = startHandlerStyle.triggerMinSize) !== null && _a !== void 0 ? _a : 40;
24681
24750
  const endHandlerMinSize = (_b = endHandlerStyle.triggerMinSize) !== null && _b !== void 0 ? _b : 40;
24682
24751
  const group = this.createOrUpdateChild('dataZoom-container', {}, 'group');
24683
24752
  this._container = group;
24684
- this._background = group.createOrUpdateChild('background', Object.assign({ x: position.x, y: position.y, width,
24685
- height, cursor: brushSelect ? 'crosshair' : 'auto' }, backgroundStyle), 'rect');
24753
+ this._background = group.createOrUpdateChild('background', Object.assign(Object.assign({ x: position.x, y: position.y, width,
24754
+ height, cursor: brushSelect ? 'crosshair' : 'auto' }, backgroundStyle), { pickable: !zoomLock }), 'rect');
24686
24755
  ((_c = backgroundChartStyle.line) === null || _c === void 0 ? void 0 : _c.visible) && this.setPreviewAttributes('line', group);
24687
24756
  ((_d = backgroundChartStyle.area) === null || _d === void 0 ? void 0 : _d.visible) && this.setPreviewAttributes('area', group);
24688
24757
  brushSelect && this.renderDragMask();
24689
24758
  if (this._isHorizontal) {
24690
- this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign({ x: position.x + start * width, y: position.y, width: (end - start) * width, height: height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), 'rect');
24759
+ this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x + start * width, y: position.y, width: (end - start) * width, height: height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: !zoomLock }), 'rect');
24691
24760
  }
24692
24761
  else {
24693
- this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign({ x: position.x, y: position.y + start * height, width, height: (end - start) * height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), 'rect');
24762
+ this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x, y: position.y + start * height, width, height: (end - start) * height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: !zoomLock }), 'rect');
24694
24763
  }
24695
24764
  ((_e = selectedBackgroundChartStyle.line) === null || _e === void 0 ? void 0 : _e.visible) && this.setSelectedPreviewAttributes('line', group);
24696
24765
  ((_f = selectedBackgroundChartStyle.area) === null || _f === void 0 ? void 0 : _f.visible) && this.setSelectedPreviewAttributes('area', group);
@@ -24700,34 +24769,34 @@
24700
24769
  if (this._isHorizontal) {
24701
24770
  if (middleHandlerStyle.visible) {
24702
24771
  const middleHandlerBackgroundSize = ((_g = middleHandlerStyle.background) === null || _g === void 0 ? void 0 : _g.size) || 10;
24703
- this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign({ x: position.x + start * width, y: position.y - middleHandlerBackgroundSize, width: (end - start) * width, height: middleHandlerBackgroundSize }, (_h = middleHandlerStyle.background) === null || _h === void 0 ? void 0 : _h.style), 'rect');
24704
- this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign({ x: position.x + ((start + end) / 2) * width, y: position.y - middleHandlerBackgroundSize / 2, strokeBoundsBuffer: 0, angle: 0, symbolType: (_k = (_j = middleHandlerStyle.icon) === null || _j === void 0 ? void 0 : _j.symbolType) !== null && _k !== void 0 ? _k : 'square' }, middleHandlerStyle.icon), 'symbol');
24772
+ this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: position.x + start * width, y: position.y - middleHandlerBackgroundSize, width: (end - start) * width, height: middleHandlerBackgroundSize }, (_h = middleHandlerStyle.background) === null || _h === void 0 ? void 0 : _h.style), { pickable: !zoomLock }), 'rect');
24773
+ this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign(Object.assign({ x: position.x + ((start + end) / 2) * width, y: position.y - middleHandlerBackgroundSize / 2, strokeBoundsBuffer: 0, angle: 0, symbolType: (_k = (_j = middleHandlerStyle.icon) === null || _j === void 0 ? void 0 : _j.symbolType) !== null && _k !== void 0 ? _k : 'square' }, middleHandlerStyle.icon), { pickable: !zoomLock }), 'symbol');
24705
24774
  }
24706
- this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign({ x: position.x + start * width, y: position.y + height / 2, size: height, symbolType: (_l = startHandlerStyle.symbolType) !== null && _l !== void 0 ? _l : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), 'symbol');
24707
- this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign({ x: position.x + end * width, y: position.y + height / 2, size: height, symbolType: (_m = endHandlerStyle.symbolType) !== null && _m !== void 0 ? _m : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), 'symbol');
24775
+ this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + start * width, y: position.y + height / 2, size: height, symbolType: (_l = startHandlerStyle.symbolType) !== null && _l !== void 0 ? _l : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), { pickable: !zoomLock }), 'symbol');
24776
+ this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + end * width, y: position.y + height / 2, size: height, symbolType: (_m = endHandlerStyle.symbolType) !== null && _m !== void 0 ? _m : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), { pickable: !zoomLock }), 'symbol');
24708
24777
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize);
24709
24778
  const startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize);
24710
24779
  const endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize);
24711
24780
  const endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
24712
- this._startHandlerMask = group.createOrUpdateChild('startHandlerMask', Object.assign({ x: position.x + start * width - startHandlerWidth / 2, y: position.y + height / 2 - startHandlerHeight / 2, width: startHandlerWidth, height: startHandlerHeight, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.horizontal), 'rect');
24713
- this._endHandlerMask = group.createOrUpdateChild('endHandlerMask', Object.assign({ x: position.x + end * width - endHandlerWidth / 2, y: position.y + height / 2 - endHandlerHeight / 2, width: endHandlerWidth, height: endHandlerHeight, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.horizontal), 'rect');
24781
+ this._startHandlerMask = group.createOrUpdateChild('startHandlerMask', Object.assign(Object.assign({ x: position.x + start * width - startHandlerWidth / 2, y: position.y + height / 2 - startHandlerHeight / 2, width: startHandlerWidth, height: startHandlerHeight, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.horizontal), { pickable: !zoomLock }), 'rect');
24782
+ this._endHandlerMask = group.createOrUpdateChild('endHandlerMask', Object.assign(Object.assign({ x: position.x + end * width - endHandlerWidth / 2, y: position.y + height / 2 - endHandlerHeight / 2, width: endHandlerWidth, height: endHandlerHeight, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.horizontal), { pickable: !zoomLock }), 'rect');
24714
24783
  }
24715
24784
  else {
24716
24785
  if (middleHandlerStyle.visible) {
24717
24786
  const middleHandlerBackgroundSize = ((_o = middleHandlerStyle.background) === null || _o === void 0 ? void 0 : _o.size) || 10;
24718
- this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign({ x: orient === 'left' ? position.x - middleHandlerBackgroundSize : position.x + width, y: position.y + start * height, width: middleHandlerBackgroundSize, height: (end - start) * height }, (_p = middleHandlerStyle.background) === null || _p === void 0 ? void 0 : _p.style), 'rect');
24719
- this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign({ x: orient === 'left'
24787
+ this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: orient === 'left' ? position.x - middleHandlerBackgroundSize : position.x + width, y: position.y + start * height, width: middleHandlerBackgroundSize, height: (end - start) * height }, (_p = middleHandlerStyle.background) === null || _p === void 0 ? void 0 : _p.style), { pickable: !zoomLock }), 'rect');
24788
+ this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign(Object.assign({ x: orient === 'left'
24720
24789
  ? position.x - middleHandlerBackgroundSize / 2
24721
- : position.x + width + middleHandlerBackgroundSize / 2, y: position.y + ((start + end) / 2) * height, angle: 90 * (Math.PI / 180), symbolType: (_r = (_q = middleHandlerStyle.icon) === null || _q === void 0 ? void 0 : _q.symbolType) !== null && _r !== void 0 ? _r : 'square', strokeBoundsBuffer: 0 }, middleHandlerStyle.icon), 'symbol');
24790
+ : position.x + width + middleHandlerBackgroundSize / 2, y: position.y + ((start + end) / 2) * height, angle: 90 * (Math.PI / 180), symbolType: (_r = (_q = middleHandlerStyle.icon) === null || _q === void 0 ? void 0 : _q.symbolType) !== null && _r !== void 0 ? _r : 'square', strokeBoundsBuffer: 0 }, middleHandlerStyle.icon), { pickable: !zoomLock }), 'symbol');
24722
24791
  }
24723
- this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + start * height, size: width, symbolType: (_s = startHandlerStyle.symbolType) !== null && _s !== void 0 ? _s : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), 'symbol');
24724
- this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + end * height, size: width, symbolType: (_t = endHandlerStyle.symbolType) !== null && _t !== void 0 ? _t : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), 'symbol');
24792
+ this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + start * height, size: width, symbolType: (_s = startHandlerStyle.symbolType) !== null && _s !== void 0 ? _s : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), { pickable: !zoomLock }), 'symbol');
24793
+ this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + end * height, size: width, symbolType: (_t = endHandlerStyle.symbolType) !== null && _t !== void 0 ? _t : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), { pickable: !zoomLock }), 'symbol');
24725
24794
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize);
24726
24795
  const startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize);
24727
24796
  const endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize);
24728
24797
  const endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
24729
- this._startHandlerMask = group.createOrUpdateChild('startHandlerMask', Object.assign({ x: position.x + width / 2 + startHandlerWidth / 2, y: position.y + start * height - startHandlerHeight / 2, width: endHandlerHeight, height: endHandlerWidth, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.vertical), 'rect');
24730
- this._endHandlerMask = group.createOrUpdateChild('endHandlerMask', Object.assign({ x: position.x + width / 2 + endHandlerWidth / 2, y: position.y + end * height - endHandlerHeight / 2, width: endHandlerHeight, height: endHandlerWidth, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.vertical), 'rect');
24798
+ this._startHandlerMask = group.createOrUpdateChild('startHandlerMask', Object.assign(Object.assign({ x: position.x + width / 2 + startHandlerWidth / 2, y: position.y + start * height - startHandlerHeight / 2, width: endHandlerHeight, height: endHandlerWidth, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.vertical), { pickable: !zoomLock }), 'rect');
24799
+ this._endHandlerMask = group.createOrUpdateChild('endHandlerMask', Object.assign(Object.assign({ x: position.x + width / 2 + endHandlerWidth / 2, y: position.y + end * height - endHandlerHeight / 2, width: endHandlerHeight, height: endHandlerWidth, fill: 'white', fillOpacity: 0, zIndex: 999 }, DEFAULT_HANDLER_ATTR_MAP.vertical), { pickable: !zoomLock }), 'rect');
24731
24800
  }
24732
24801
  }
24733
24802
  computeBasePoints() {
@@ -24968,6 +25037,12 @@
24968
25037
  super(...arguments);
24969
25038
  this.name = 'marker';
24970
25039
  }
25040
+ setAttribute(key, value, forceUpdateTag) {
25041
+ super.setAttribute(key, value, forceUpdateTag);
25042
+ if (key === 'visible') {
25043
+ this.render();
25044
+ }
25045
+ }
24971
25046
  _initContainer() {
24972
25047
  var _a, _b;
24973
25048
  const { limitRect = {}, clipInRange } = this.attribute;
@@ -25012,22 +25087,20 @@
25012
25087
  if (this.attribute.interactive === false) {
25013
25088
  this.setAttribute('childrenPickable', false);
25014
25089
  }
25015
- if (markerVisible) {
25016
- if (!this._container && this.isValidPoints()) {
25090
+ if (markerVisible && this.isValidPoints()) {
25091
+ if (!this._container) {
25017
25092
  this._initContainer();
25018
25093
  this.initMarker(this._container);
25019
25094
  }
25020
25095
  else {
25021
- if (!this.isValidPoints()) {
25022
- this._container = null;
25023
- this.removeAllChild();
25024
- }
25025
- else {
25026
- this._updateContainer();
25027
- this.updateMarker();
25028
- }
25096
+ this._updateContainer();
25097
+ this.updateMarker();
25029
25098
  }
25030
25099
  }
25100
+ else {
25101
+ this._container = null;
25102
+ this.removeAllChild();
25103
+ }
25031
25104
  }
25032
25105
  }
25033
25106
 
@@ -29860,7 +29933,7 @@
29860
29933
  }
29861
29934
  };
29862
29935
 
29863
- const version = "0.17.10";
29936
+ const version = "0.17.11-alpha.2";
29864
29937
 
29865
29938
  exports.AbstractComponent = AbstractComponent;
29866
29939
  exports.ArcInfo = ArcInfo;