@visactor/vrender-components 0.18.0-alpha.1 → 0.18.0-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.
Files changed (67) hide show
  1. package/cjs/data-zoom/data-zoom.d.ts +1 -0
  2. package/cjs/data-zoom/data-zoom.js +59 -55
  3. package/cjs/data-zoom/data-zoom.js.map +1 -1
  4. package/cjs/data-zoom/type.d.ts +1 -0
  5. package/cjs/data-zoom/type.js.map +1 -1
  6. package/cjs/index.d.ts +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/index.js.map +1 -1
  9. package/cjs/legend/color/color.d.ts +7 -0
  10. package/cjs/legend/color/color.js +16 -2
  11. package/cjs/legend/color/color.js.map +1 -1
  12. package/cjs/legend/discrete/discrete.d.ts +20 -3
  13. package/cjs/legend/discrete/discrete.js +166 -75
  14. package/cjs/legend/discrete/discrete.js.map +1 -1
  15. package/cjs/legend/discrete/type.d.ts +18 -7
  16. package/cjs/legend/discrete/type.js.map +1 -1
  17. package/cjs/legend/register.js +2 -2
  18. package/cjs/legend/register.js.map +1 -1
  19. package/cjs/legend/size/size.d.ts +1 -0
  20. package/cjs/legend/size/size.js +4 -1
  21. package/cjs/legend/size/size.js.map +1 -1
  22. package/cjs/pager/pager.d.ts +2 -0
  23. package/cjs/pager/pager.js +13 -3
  24. package/cjs/pager/pager.js.map +1 -1
  25. package/cjs/pager/type.d.ts +1 -0
  26. package/cjs/pager/type.js.map +1 -1
  27. package/cjs/scrollbar/scrollbar.js +10 -2
  28. package/cjs/scrollbar/scrollbar.js.map +1 -1
  29. package/cjs/slider/slider.d.ts +27 -0
  30. package/cjs/slider/slider.js +101 -12
  31. package/cjs/slider/slider.js.map +1 -1
  32. package/cjs/slider/type.d.ts +9 -1
  33. package/cjs/slider/type.js.map +1 -1
  34. package/es/data-zoom/data-zoom.d.ts +1 -0
  35. package/es/data-zoom/data-zoom.js +59 -57
  36. package/es/data-zoom/data-zoom.js.map +1 -1
  37. package/es/data-zoom/type.d.ts +1 -0
  38. package/es/data-zoom/type.js.map +1 -1
  39. package/es/index.d.ts +1 -1
  40. package/es/index.js +1 -1
  41. package/es/index.js.map +1 -1
  42. package/es/legend/color/color.d.ts +7 -0
  43. package/es/legend/color/color.js +17 -3
  44. package/es/legend/color/color.js.map +1 -1
  45. package/es/legend/discrete/discrete.d.ts +20 -3
  46. package/es/legend/discrete/discrete.js +166 -74
  47. package/es/legend/discrete/discrete.js.map +1 -1
  48. package/es/legend/discrete/type.d.ts +18 -7
  49. package/es/legend/discrete/type.js.map +1 -1
  50. package/es/legend/register.js +3 -1
  51. package/es/legend/register.js.map +1 -1
  52. package/es/legend/size/size.d.ts +1 -0
  53. package/es/legend/size/size.js +4 -1
  54. package/es/legend/size/size.js.map +1 -1
  55. package/es/pager/pager.d.ts +2 -0
  56. package/es/pager/pager.js +14 -4
  57. package/es/pager/pager.js.map +1 -1
  58. package/es/pager/type.d.ts +1 -0
  59. package/es/pager/type.js.map +1 -1
  60. package/es/scrollbar/scrollbar.js +10 -2
  61. package/es/scrollbar/scrollbar.js.map +1 -1
  62. package/es/slider/slider.d.ts +27 -0
  63. package/es/slider/slider.js +101 -12
  64. package/es/slider/slider.js.map +1 -1
  65. package/es/slider/type.d.ts +9 -1
  66. package/es/slider/type.js.map +1 -1
  67. package/package.json +5 -5
@@ -165,6 +165,7 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
165
165
  y: number;
166
166
  };
167
167
  private _onHandlerPointerDown;
168
+ private _pointerMove;
168
169
  private _onHandlerPointerMove;
169
170
  private _onHandlerPointerUp;
170
171
  private _onHandlerPointerEnter;
@@ -61,11 +61,11 @@ class DataZoom extends base_1.AbstractComponent {
61
61
  this._activeItem = this._background), this._activeState = !0, this._activeCache.startPos = this.eventPosToStagePos(e),
62
62
  this._activeCache.lastPos = this.eventPosToStagePos(e), "browser" === vrender_core_1.vglobal.env && (vrender_core_1.vglobal.addEventListener("pointermove", this._onHandlerPointerMove, {
63
63
  capture: !0
64
- }), vrender_core_1.vglobal.addEventListener("pointerup", this._onHandlerPointerUp.bind(this))),
64
+ }), vrender_core_1.vglobal.addEventListener("pointerup", this._onHandlerPointerUp)),
65
65
  this.addEventListener("pointermove", this._onHandlerPointerMove, {
66
66
  capture: !0
67
67
  });
68
- }, this._onHandlerPointerMove = delayMap[this.attribute.delayType]((e => {
68
+ }, this._pointerMove = e => {
69
69
  e.stopPropagation();
70
70
  const {start: startAttr, end: endAttr, brushSelect: brushSelect, realTime: realTime = !0} = this.attribute, pos = this.eventPosToStagePos(e), {attPos: attPos, max: max} = this._layoutCache, dis = (pos[attPos] - this._activeCache.lastPos[attPos]) / max;
71
71
  let {start: start, end: end} = this.state;
@@ -74,12 +74,31 @@ class DataZoom extends base_1.AbstractComponent {
74
74
  start = end + dis, this._activeTag = type_1.DataZoomActiveTag.startHandler) : end += dis),
75
75
  this._activeCache.lastPos = pos, brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1),
76
76
  end = Math.min(Math.max(end, 0), 1), startAttr === start && endAttr === end || (this.setStateAttr(start, end, !0),
77
- this._dispatchEvent("change", {
77
+ realTime && this._dispatchEvent("change", {
78
78
  start: start,
79
79
  end: end,
80
80
  tag: this._activeTag
81
81
  }));
82
- }), this.attribute.delayTime);
82
+ }, this._onHandlerPointerMove = 0 === this.attribute.delayTime ? this._pointerMove : delayMap[this.attribute.delayType](this._pointerMove, this.attribute.delayTime),
83
+ this._onHandlerPointerUp = e => {
84
+ e.preventDefault();
85
+ const {start: start, end: end, brushSelect: brushSelect, realTime: realTime = !0} = this.attribute;
86
+ if (this._activeState && this._activeTag === type_1.DataZoomActiveTag.background) {
87
+ const pos = this.eventPosToStagePos(e);
88
+ this.backgroundDragZoom(this._activeCache.startPos, pos);
89
+ }
90
+ this._activeState = !1, brushSelect && this.renderDragMask(), start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0),
91
+ this._dispatchEvent("change", {
92
+ start: this.state.start,
93
+ end: this.state.end,
94
+ tag: this._activeTag
95
+ })), "browser" === vrender_core_1.vglobal.env && (vrender_core_1.vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
96
+ capture: !0
97
+ }), vrender_core_1.vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)),
98
+ this.removeEventListener("pointermove", this._onHandlerPointerMove, {
99
+ capture: !0
100
+ }), this.removeEventListener("pointerup", this._onHandlerPointerUp);
101
+ };
83
102
  const {position: position, showDetail: showDetail} = attributes;
84
103
  this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail,
85
104
  this.setPropsFromAttrs();
@@ -123,25 +142,6 @@ class DataZoom extends base_1.AbstractComponent {
123
142
  y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
124
143
  };
125
144
  }
126
- _onHandlerPointerUp(e) {
127
- e.preventDefault();
128
- const {start: start, end: end, brushSelect: brushSelect, realTime: realTime = !0} = this.attribute;
129
- if (this._activeState && this._activeTag === type_1.DataZoomActiveTag.background) {
130
- const pos = this.eventPosToStagePos(e);
131
- this.backgroundDragZoom(this._activeCache.startPos, pos);
132
- }
133
- this._activeState = !1, brushSelect && this.renderDragMask(), realTime && start === this.state.start && end === this.state.end || (this.setStateAttr(this.state.start, this.state.end, !0),
134
- this._dispatchEvent("change", {
135
- start: this.state.start,
136
- end: this.state.end,
137
- tag: this._activeTag
138
- })), "browser" === vrender_core_1.vglobal.env && (vrender_core_1.vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
139
- capture: !0
140
- }), vrender_core_1.vglobal.removeEventListener("pointerup", this._onHandlerPointerUp.bind(this))),
141
- this.removeEventListener("pointermove", this._onHandlerPointerMove, {
142
- capture: !0
143
- });
144
- }
145
145
  _onHandlerPointerEnter(e) {
146
146
  e.stopPropagation(), this._showText = !0, this.renderText();
147
147
  }
@@ -247,9 +247,9 @@ class DataZoom extends base_1.AbstractComponent {
247
247
  } else this._isHorizontal ? this._startText.setAttribute("dy", startTextDy) : this._startText.setAttribute("dx", startTextDx);
248
248
  }
249
249
  getLayoutAttrFromConfig() {
250
- var _a, _b, _c, _d;
250
+ var _a, _b, _c, _d, _e, _f;
251
251
  if (this._layoutAttrFromConfig) return this._layoutAttrFromConfig;
252
- const {position: positionConfig, size: size, orient: orient, middleHandlerStyle: middleHandlerStyle = {}, startHandlerStyle: startHandlerStyle = {}, endHandlerStyle: endHandlerStyle = {}} = this.attribute, {width: widthConfig, height: heightConfig} = size, middleHandlerSize = null !== (_b = null === (_a = middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10;
252
+ const {position: positionConfig, size: size, orient: orient, middleHandlerStyle: middleHandlerStyle = {}, startHandlerStyle: startHandlerStyle = {}, endHandlerStyle: endHandlerStyle = {}, backgroundStyle: backgroundStyle = {}} = this.attribute, {width: widthConfig, height: heightConfig} = size, middleHandlerSize = null !== (_b = null === (_a = middleHandlerStyle.background) || void 0 === _a ? void 0 : _a.size) && void 0 !== _b ? _b : 10;
253
253
  let width, height, position;
254
254
  middleHandlerStyle.visible ? this._isHorizontal ? (width = widthConfig, height = heightConfig - middleHandlerSize,
255
255
  position = {
@@ -266,15 +266,17 @@ class DataZoom extends base_1.AbstractComponent {
266
266
  y: position.y
267
267
  }) : (height -= (startHandlerSize + endHandlerSize) / 2, position = {
268
268
  x: position.x,
269
- y: position.y + startHandlerSize
270
- })), this._layoutAttrFromConfig = {
269
+ y: position.y + startHandlerSize / 2
270
+ })), height += null !== (_e = backgroundStyle.lineWidth / 2) && void 0 !== _e ? _e : 1,
271
+ width += null !== (_f = backgroundStyle.lineWidth / 2) && void 0 !== _f ? _f : 1,
272
+ this._layoutAttrFromConfig = {
271
273
  position: position,
272
274
  width: width,
273
275
  height: height
274
276
  }, this._layoutAttrFromConfig;
275
277
  }
276
278
  render() {
277
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
279
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
278
280
  this._layoutAttrFromConfig = null;
279
281
  const {orient: orient, backgroundStyle: backgroundStyle, backgroundChartStyle: backgroundChartStyle = {}, selectedBackgroundStyle: selectedBackgroundStyle = {}, selectedBackgroundChartStyle: selectedBackgroundChartStyle = {}, middleHandlerStyle: middleHandlerStyle = {}, startHandlerStyle: startHandlerStyle = {}, endHandlerStyle: endHandlerStyle = {}, brushSelect: brushSelect, zoomLock: zoomLock} = this.attribute, {start: start, end: end} = this.state, {position: position, width: width, height: height} = this.getLayoutAttrFromConfig(), startHandlerMinSize = null !== (_a = startHandlerStyle.triggerMinSize) && void 0 !== _a ? _a : 40, endHandlerMinSize = null !== (_b = endHandlerStyle.triggerMinSize) && void 0 !== _b ? _b : 40, group = this.createOrUpdateChild("dataZoom-container", {}, "group");
280
282
  if (this._container = group, this._background = group.createOrUpdateChild("background", Object.assign(Object.assign({
@@ -284,9 +286,9 @@ class DataZoom extends base_1.AbstractComponent {
284
286
  height: height,
285
287
  cursor: brushSelect ? "crosshair" : "auto"
286
288
  }, backgroundStyle), {
287
- pickable: !zoomLock
288
- }), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
289
- (null === (_d = backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group),
289
+ pickable: !zoomLock && (null === (_c = backgroundStyle.pickable) || void 0 === _c || _c)
290
+ }), "rect"), (null === (_d = backgroundChartStyle.line) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("line", group),
291
+ (null === (_e = backgroundChartStyle.area) || void 0 === _e ? void 0 : _e.visible) && this.setPreviewAttributes("area", group),
290
292
  brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
291
293
  x: position.x + start * width,
292
294
  y: position.y,
@@ -294,7 +296,7 @@ class DataZoom extends base_1.AbstractComponent {
294
296
  height: height,
295
297
  cursor: brushSelect ? "crosshair" : "move"
296
298
  }, selectedBackgroundStyle), {
297
- pickable: !zoomLock
299
+ pickable: !zoomLock && (null === (_f = selectedBackgroundChartStyle.pickable) || void 0 === _f || _f)
298
300
  }), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
299
301
  x: position.x,
300
302
  y: position.y + start * height,
@@ -302,43 +304,43 @@ class DataZoom extends base_1.AbstractComponent {
302
304
  height: (end - start) * height,
303
305
  cursor: brushSelect ? "crosshair" : "move"
304
306
  }, selectedBackgroundStyle), {
305
- pickable: !zoomLock
306
- }), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
307
- (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group),
307
+ pickable: !zoomLock && (null === (_g = selectedBackgroundStyle.pickable) || void 0 === _g || _g)
308
+ }), "rect"), (null === (_h = selectedBackgroundChartStyle.line) || void 0 === _h ? void 0 : _h.visible) && this.setSelectedPreviewAttributes("line", group),
309
+ (null === (_j = selectedBackgroundChartStyle.area) || void 0 === _j ? void 0 : _j.visible) && this.setSelectedPreviewAttributes("area", group),
308
310
  this._isHorizontal) {
309
311
  if (middleHandlerStyle.visible) {
310
- const middleHandlerBackgroundSize = (null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10;
312
+ const middleHandlerBackgroundSize = (null === (_k = middleHandlerStyle.background) || void 0 === _k ? void 0 : _k.size) || 10;
311
313
  this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
312
314
  x: position.x + start * width,
313
315
  y: position.y - middleHandlerBackgroundSize,
314
316
  width: (end - start) * width,
315
317
  height: middleHandlerBackgroundSize
316
- }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), {
317
- pickable: !zoomLock
318
+ }, null === (_l = middleHandlerStyle.background) || void 0 === _l ? void 0 : _l.style), {
319
+ pickable: !zoomLock && (null === (_p = null === (_o = null === (_m = middleHandlerStyle.background) || void 0 === _m ? void 0 : _m.style) || void 0 === _o ? void 0 : _o.pickable) || void 0 === _p || _p)
318
320
  }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
319
321
  x: position.x + (start + end) / 2 * width,
320
322
  y: position.y - middleHandlerBackgroundSize / 2,
321
323
  strokeBoundsBuffer: 0,
322
324
  angle: 0,
323
- symbolType: null !== (_k = null === (_j = middleHandlerStyle.icon) || void 0 === _j ? void 0 : _j.symbolType) && void 0 !== _k ? _k : "square"
325
+ symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square"
324
326
  }, middleHandlerStyle.icon), {
325
- pickable: !zoomLock
327
+ pickable: !zoomLock && (null === (_s = middleHandlerStyle.icon.pickable) || void 0 === _s || _s)
326
328
  }), "symbol");
327
329
  }
328
330
  this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
329
331
  x: position.x + start * width,
330
332
  y: position.y + height / 2,
331
333
  size: height,
332
- symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
334
+ symbolType: null !== (_t = startHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
333
335
  }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
334
- pickable: !zoomLock
336
+ pickable: !zoomLock && (null === (_u = startHandlerStyle.pickable) || void 0 === _u || _u)
335
337
  }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
336
338
  x: position.x + end * width,
337
339
  y: position.y + height / 2,
338
340
  size: height,
339
- symbolType: null !== (_m = endHandlerStyle.symbolType) && void 0 !== _m ? _m : "square"
341
+ symbolType: null !== (_v = endHandlerStyle.symbolType) && void 0 !== _v ? _v : "square"
340
342
  }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
341
- pickable: !zoomLock
343
+ pickable: !zoomLock && (null === (_w = endHandlerStyle.pickable) || void 0 === _w || _w)
342
344
  }), "symbol");
343
345
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize), startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize), endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize), endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
344
346
  this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
@@ -364,38 +366,38 @@ class DataZoom extends base_1.AbstractComponent {
364
366
  }), "rect");
365
367
  } else {
366
368
  if (middleHandlerStyle.visible) {
367
- const middleHandlerBackgroundSize = (null === (_o = middleHandlerStyle.background) || void 0 === _o ? void 0 : _o.size) || 10;
369
+ const middleHandlerBackgroundSize = (null === (_x = middleHandlerStyle.background) || void 0 === _x ? void 0 : _x.size) || 10;
368
370
  this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
369
371
  x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
370
372
  y: position.y + start * height,
371
373
  width: middleHandlerBackgroundSize,
372
374
  height: (end - start) * height
373
- }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), {
374
- pickable: !zoomLock
375
+ }, null === (_y = middleHandlerStyle.background) || void 0 === _y ? void 0 : _y.style), {
376
+ pickable: !zoomLock && (null === (_1 = null === (_0 = null === (_z = middleHandlerStyle.background) || void 0 === _z ? void 0 : _z.style) || void 0 === _0 ? void 0 : _0.pickable) || void 0 === _1 || _1)
375
377
  }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
376
378
  x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
377
379
  y: position.y + (start + end) / 2 * height,
378
380
  angle: Math.PI / 180 * 90,
379
- symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square",
381
+ symbolType: null !== (_3 = null === (_2 = middleHandlerStyle.icon) || void 0 === _2 ? void 0 : _2.symbolType) && void 0 !== _3 ? _3 : "square",
380
382
  strokeBoundsBuffer: 0
381
383
  }, middleHandlerStyle.icon), {
382
- pickable: !zoomLock
384
+ pickable: !zoomLock && (null === (_5 = null === (_4 = middleHandlerStyle.icon) || void 0 === _4 ? void 0 : _4.pickable) || void 0 === _5 || _5)
383
385
  }), "symbol");
384
386
  }
385
387
  this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
386
388
  x: position.x + width / 2,
387
389
  y: position.y + start * height,
388
390
  size: width,
389
- symbolType: null !== (_s = startHandlerStyle.symbolType) && void 0 !== _s ? _s : "square"
391
+ symbolType: null !== (_6 = startHandlerStyle.symbolType) && void 0 !== _6 ? _6 : "square"
390
392
  }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
391
- pickable: !zoomLock
393
+ pickable: !zoomLock && (null === (_7 = startHandlerStyle.pickable) || void 0 === _7 || _7)
392
394
  }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
393
395
  x: position.x + width / 2,
394
396
  y: position.y + end * height,
395
397
  size: width,
396
- symbolType: null !== (_t = endHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
398
+ symbolType: null !== (_8 = endHandlerStyle.symbolType) && void 0 !== _8 ? _8 : "square"
397
399
  }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
398
- pickable: !zoomLock
400
+ pickable: !zoomLock && (null === (_9 = endHandlerStyle.pickable) || void 0 === _9 || _9)
399
401
  }), "symbol");
400
402
  const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize), startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize), endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize), endHandlerHeight = Math.max(this._endHandler.AABBBounds.height(), endHandlerMinSize);
401
403
  this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
@@ -449,22 +451,24 @@ class DataZoom extends base_1.AbstractComponent {
449
451
  };
450
452
  }
451
453
  getPreviewLinePoints() {
452
- const previewPoints = this._previewData.map((d => ({
454
+ let previewPoints = this._previewData.map((d => ({
453
455
  x: this._previewPointsX && this._previewPointsX(d),
454
456
  y: this._previewPointsY && this._previewPointsY(d)
455
457
  })));
456
458
  if (0 === previewPoints.length) return previewPoints;
459
+ this.attribute.tolerance && (previewPoints = (0, vrender_core_1.flatten_simplify)(previewPoints, this.attribute.tolerance, !1));
457
460
  const {basePointStart: basePointStart, basePointEnd: basePointEnd} = this.computeBasePoints();
458
461
  return basePointStart.concat(previewPoints).concat(basePointEnd);
459
462
  }
460
463
  getPreviewAreaPoints() {
461
- const previewPoints = this._previewData.map((d => ({
464
+ let previewPoints = this._previewData.map((d => ({
462
465
  x: this._previewPointsX && this._previewPointsX(d),
463
466
  y: this._previewPointsY && this._previewPointsY(d),
464
467
  x1: this._previewPointsX1 && this._previewPointsX1(d),
465
468
  y1: this._previewPointsY1 && this._previewPointsY1(d)
466
469
  })));
467
470
  if (0 === previewPoints.length) return previewPoints;
471
+ this.attribute.tolerance && (previewPoints = (0, vrender_core_1.flatten_simplify)(previewPoints, this.attribute.tolerance, !1));
468
472
  const {basePointStart: basePointStart, basePointEnd: basePointEnd} = this.computeBasePoints();
469
473
  return basePointStart.concat(previewPoints).concat(basePointEnd);
470
474
  }