@visactor/vrender-components 0.17.19 → 0.18.0-alpha.0

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 (147) hide show
  1. package/cjs/axis/base.js +15 -19
  2. package/cjs/axis/base.js.map +1 -1
  3. package/cjs/axis/line.js +52 -59
  4. package/cjs/axis/line.js.map +1 -1
  5. package/cjs/axis/overlap/auto-hide.d.ts +0 -1
  6. package/cjs/axis/overlap/auto-hide.js +2 -10
  7. package/cjs/axis/overlap/auto-hide.js.map +1 -1
  8. package/cjs/axis/overlap/auto-limit.d.ts +0 -1
  9. package/cjs/axis/overlap/auto-limit.js +3 -5
  10. package/cjs/axis/overlap/auto-limit.js.map +1 -1
  11. package/cjs/axis/type.d.ts +0 -1
  12. package/cjs/axis/type.js.map +1 -1
  13. package/cjs/brush/brush.js +4 -4
  14. package/cjs/brush/brush.js.map +1 -1
  15. package/cjs/data-zoom/data-zoom.d.ts +1 -5
  16. package/cjs/data-zoom/data-zoom.js +78 -136
  17. package/cjs/data-zoom/data-zoom.js.map +1 -1
  18. package/cjs/index.d.ts +1 -2
  19. package/cjs/index.js +2 -3
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/indicator/indicator.d.ts +1 -3
  22. package/cjs/indicator/indicator.js +15 -54
  23. package/cjs/indicator/indicator.js.map +1 -1
  24. package/cjs/indicator/type.d.ts +0 -1
  25. package/cjs/indicator/type.js.map +1 -1
  26. package/cjs/label/arc.d.ts +2 -2
  27. package/cjs/label/arc.js +35 -38
  28. package/cjs/label/arc.js.map +1 -1
  29. package/cjs/label/base.d.ts +8 -6
  30. package/cjs/label/base.js +52 -88
  31. package/cjs/label/base.js.map +1 -1
  32. package/cjs/label/line.js +4 -3
  33. package/cjs/label/line.js.map +1 -1
  34. package/cjs/label/type.d.ts +7 -14
  35. package/cjs/label/type.js.map +1 -1
  36. package/cjs/label/util.d.ts +0 -4
  37. package/cjs/label/util.js +3 -24
  38. package/cjs/label/util.js.map +1 -1
  39. package/cjs/legend/discrete/discrete.d.ts +14 -1
  40. package/cjs/legend/discrete/discrete.js +51 -25
  41. package/cjs/legend/discrete/discrete.js.map +1 -1
  42. package/cjs/legend/discrete/type.d.ts +1 -0
  43. package/cjs/legend/discrete/type.js.map +1 -1
  44. package/cjs/marker/area.js +1 -5
  45. package/cjs/marker/area.js.map +1 -1
  46. package/cjs/marker/base.d.ts +0 -1
  47. package/cjs/marker/base.js +3 -6
  48. package/cjs/marker/base.js.map +1 -1
  49. package/cjs/marker/line.js +1 -7
  50. package/cjs/marker/line.js.map +1 -1
  51. package/cjs/marker/point.d.ts +0 -1
  52. package/cjs/marker/point.js +11 -24
  53. package/cjs/marker/point.js.map +1 -1
  54. package/cjs/marker/type.d.ts +0 -1
  55. package/cjs/marker/type.js.map +1 -1
  56. package/cjs/pager/pager.d.ts +2 -0
  57. package/cjs/pager/pager.js +15 -6
  58. package/cjs/pager/pager.js.map +1 -1
  59. package/cjs/pager/type.d.ts +1 -0
  60. package/cjs/pager/type.js.map +1 -1
  61. package/cjs/scrollbar/scrollbar.js +3 -9
  62. package/cjs/scrollbar/scrollbar.js.map +1 -1
  63. package/cjs/tag/tag.js +3 -3
  64. package/cjs/tag/tag.js.map +1 -1
  65. package/cjs/title/title.js +2 -2
  66. package/cjs/title/title.js.map +1 -1
  67. package/cjs/util/limit-shape.d.ts +0 -4
  68. package/cjs/util/limit-shape.js +4 -13
  69. package/cjs/util/limit-shape.js.map +1 -1
  70. package/cjs/util/text.d.ts +1 -1
  71. package/cjs/util/text.js +4 -4
  72. package/cjs/util/text.js.map +1 -1
  73. package/dist/index.js +29932 -0
  74. package/dist/index.min.js +1 -0
  75. package/es/axis/base.js +15 -18
  76. package/es/axis/base.js.map +1 -1
  77. package/es/axis/line.js +50 -59
  78. package/es/axis/line.js.map +1 -1
  79. package/es/axis/overlap/auto-hide.d.ts +0 -1
  80. package/es/axis/overlap/auto-hide.js +2 -10
  81. package/es/axis/overlap/auto-hide.js.map +1 -1
  82. package/es/axis/overlap/auto-limit.d.ts +0 -1
  83. package/es/axis/overlap/auto-limit.js +3 -5
  84. package/es/axis/overlap/auto-limit.js.map +1 -1
  85. package/es/axis/type.d.ts +0 -1
  86. package/es/axis/type.js.map +1 -1
  87. package/es/brush/brush.js +4 -4
  88. package/es/brush/brush.js.map +1 -1
  89. package/es/data-zoom/data-zoom.d.ts +1 -5
  90. package/es/data-zoom/data-zoom.js +74 -135
  91. package/es/data-zoom/data-zoom.js.map +1 -1
  92. package/es/index.d.ts +1 -2
  93. package/es/index.js +1 -3
  94. package/es/index.js.map +1 -1
  95. package/es/indicator/indicator.d.ts +1 -3
  96. package/es/indicator/indicator.js +14 -53
  97. package/es/indicator/indicator.js.map +1 -1
  98. package/es/indicator/type.d.ts +0 -1
  99. package/es/indicator/type.js.map +1 -1
  100. package/es/label/arc.d.ts +2 -2
  101. package/es/label/arc.js +35 -38
  102. package/es/label/arc.js.map +1 -1
  103. package/es/label/base.d.ts +8 -6
  104. package/es/label/base.js +50 -89
  105. package/es/label/base.js.map +1 -1
  106. package/es/label/line.js +4 -3
  107. package/es/label/line.js.map +1 -1
  108. package/es/label/type.d.ts +7 -14
  109. package/es/label/type.js.map +1 -1
  110. package/es/label/util.d.ts +0 -4
  111. package/es/label/util.js +2 -22
  112. package/es/label/util.js.map +1 -1
  113. package/es/legend/discrete/discrete.d.ts +14 -1
  114. package/es/legend/discrete/discrete.js +50 -27
  115. package/es/legend/discrete/discrete.js.map +1 -1
  116. package/es/legend/discrete/type.d.ts +1 -0
  117. package/es/legend/discrete/type.js.map +1 -1
  118. package/es/marker/area.js +2 -6
  119. package/es/marker/area.js.map +1 -1
  120. package/es/marker/base.d.ts +0 -1
  121. package/es/marker/base.js +3 -6
  122. package/es/marker/base.js.map +1 -1
  123. package/es/marker/line.js +2 -8
  124. package/es/marker/line.js.map +1 -1
  125. package/es/marker/point.d.ts +0 -1
  126. package/es/marker/point.js +11 -25
  127. package/es/marker/point.js.map +1 -1
  128. package/es/marker/type.d.ts +0 -1
  129. package/es/marker/type.js.map +1 -1
  130. package/es/pager/pager.d.ts +2 -0
  131. package/es/pager/pager.js +16 -6
  132. package/es/pager/pager.js.map +1 -1
  133. package/es/pager/type.d.ts +1 -0
  134. package/es/pager/type.js.map +1 -1
  135. package/es/scrollbar/scrollbar.js +3 -9
  136. package/es/scrollbar/scrollbar.js.map +1 -1
  137. package/es/tag/tag.js +3 -3
  138. package/es/tag/tag.js.map +1 -1
  139. package/es/title/title.js +3 -3
  140. package/es/title/title.js.map +1 -1
  141. package/es/util/limit-shape.d.ts +0 -4
  142. package/es/util/limit-shape.js +3 -11
  143. package/es/util/limit-shape.js.map +1 -1
  144. package/es/util/text.d.ts +1 -1
  145. package/es/util/text.js +4 -4
  146. package/es/util/text.js.map +1 -1
  147. package/package.json +5 -5
@@ -22,18 +22,6 @@ const vrender_core_1 = require("@visactor/vrender-core"), vutils_1 = require("@v
22
22
  (0, register_1.loadDataZoomComponent)();
23
23
 
24
24
  class DataZoom extends base_1.AbstractComponent {
25
- setPropsFromAttrs() {
26
- const {start: start, end: end, orient: orient, previewData: previewData, previewPointsX: previewPointsX, previewPointsY: previewPointsY, previewPointsX1: previewPointsX1, previewPointsY1: previewPointsY1} = this.attribute;
27
- start && (this.state.start = start), end && (this.state.end = end);
28
- const {width: width, height: height} = this.getLayoutAttrFromConfig();
29
- this._spanCache = this.state.end - this.state.start, this._isHorizontal = "top" === orient || "bottom" === orient,
30
- this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y",
31
- this._layoutCache.attSize = this._isHorizontal ? "width" : "height", previewData && (this._previewData = previewData),
32
- (0, vutils_1.isFunction)(previewPointsX) && (this._previewPointsX = previewPointsX),
33
- (0, vutils_1.isFunction)(previewPointsY) && (this._previewPointsY = previewPointsY),
34
- (0, vutils_1.isFunction)(previewPointsX1) && (this._previewPointsX1 = previewPointsX1),
35
- (0, vutils_1.isFunction)(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
36
- }
37
25
  constructor(attributes, options) {
38
26
  super((null == options ? void 0 : options.skipDefault) ? attributes : (0, vutils_1.merge)({}, DataZoom.defaultAttributes, attributes)),
39
27
  this.name = "dataZoom", this._previewData = [], this._activeState = !1, this._activeCache = {
@@ -80,12 +68,15 @@ class DataZoom extends base_1.AbstractComponent {
80
68
  tag: this._activeTag
81
69
  }));
82
70
  }), this.attribute.delayTime);
83
- const {position: position, showDetail: showDetail} = attributes;
71
+ const {start: start, end: end, size: size, orient: orient, showDetail: showDetail, position: position, previewData: previewData, previewPointsX: previewPointsX, previewPointsY: previewPointsY, previewPointsX1: previewPointsX1, previewPointsY1: previewPointsY1, updateStateCallback: updateStateCallback} = this.attribute, {width: width, height: height} = size;
72
+ start && (this.state.start = start), end && (this.state.end = end), this._spanCache = this.state.end - this.state.start,
73
+ this._isHorizontal = "top" === orient || "bottom" === orient, this._layoutCache.max = this._isHorizontal ? width : height,
74
+ this._layoutCache.attPos = this._isHorizontal ? "x" : "y", this._layoutCache.attSize = this._isHorizontal ? "width" : "height",
84
75
  this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail,
85
- this.setPropsFromAttrs();
86
- }
87
- setAttributes(params, forceUpdateTag) {
88
- super.setAttributes(params, forceUpdateTag), this.setPropsFromAttrs();
76
+ previewData && (this._previewData = previewData), (0, vutils_1.isFunction)(previewPointsX) && (this._previewPointsX = previewPointsX),
77
+ (0, vutils_1.isFunction)(previewPointsY) && (this._previewPointsY = previewPointsY),
78
+ (0, vutils_1.isFunction)(previewPointsX1) && (this._previewPointsX1 = previewPointsX1),
79
+ (0, vutils_1.isFunction)(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
89
80
  }
90
81
  bindEvents() {
91
82
  if (this.attribute.disableTriggerEvent) return;
@@ -117,7 +108,7 @@ class DataZoom extends base_1.AbstractComponent {
117
108
  }
118
109
  eventPosToStagePos(e) {
119
110
  var _a, _b;
120
- const {x: x, y: y} = vrender_core_1.vglobal.mapToCanvasPoint(e, this.stage.window.getContext().canvas.nativeCanvas);
111
+ const {x: x, y: y} = vrender_core_1.vglobal.mapToCanvasPoint(e);
121
112
  return {
122
113
  x: x - ((null === (_a = this.stage) || void 0 === _a ? void 0 : _a.x) || 0),
123
114
  y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
@@ -171,80 +162,59 @@ class DataZoom extends base_1.AbstractComponent {
171
162
  height: this._activeState && this._activeTag === type_1.DataZoomActiveTag.background && Math.abs(this.dragMaskSize()) || 0
172
163
  }, dragMaskStyle), "rect");
173
164
  }
174
- isTextOverflow(componentBoundsLike, textBounds, layout) {
175
- if (!textBounds) return !1;
176
- if (this._isHorizontal) {
177
- if ("start" === layout) {
178
- if (textBounds.x1 < componentBoundsLike.x1) return !0;
179
- } else if (textBounds.x2 > componentBoundsLike.x2) return !0;
180
- } else if ("start" === layout) {
181
- if (textBounds.y1 < componentBoundsLike.y1) return !0;
182
- } else if (textBounds.y2 > componentBoundsLike.y2) return !0;
183
- return !1;
184
- }
185
- setTextAttr(startTextBounds, endTextBounds) {
186
- const {startTextStyle: startTextStyle, endTextStyle: endTextStyle} = this.attribute, {formatMethod: startTextFormat} = startTextStyle, restStartTextStyle = __rest(startTextStyle, [ "formatMethod" ]), {formatMethod: endTextFormat} = endTextStyle, restEndTextStyle = __rest(endTextStyle, [ "formatMethod" ]), {start: start, end: end} = this.state;
165
+ renderText() {
166
+ const {startTextStyle: startTextStyle, endTextStyle: endTextStyle} = this.attribute, {formatMethod: startTextFormat} = startTextStyle, restStartStyle = __rest(startTextStyle, [ "formatMethod" ]), {formatMethod: endTextFormat} = endTextStyle, restEndTextStyle = __rest(endTextStyle, [ "formatMethod" ]), {start: start, end: end} = this.state;
187
167
  this._startValue = this._statePointToData(start), this._endValue = this._statePointToData(end);
188
- const {position: position, width: width, height: height} = this.getLayoutAttrFromConfig(), startTextValue = startTextFormat ? startTextFormat(this._startValue) : this._startValue, endTextValue = endTextFormat ? endTextFormat(this._endValue) : this._endValue, componentBoundsLike = {
189
- x1: position.x,
190
- y1: position.y,
191
- x2: position.x + width,
192
- y2: position.y + height
193
- };
194
- let startTextPosition, endTextPosition, startTextAlignStyle, endTextAlignStyle;
195
- this._isHorizontal ? (startTextPosition = {
168
+ const {position: position, width: width, height: height} = this.getLayoutAttrFromConfig();
169
+ this._isHorizontal ? (this._startText = this.maybeAddLabel(this._container, (0,
170
+ vutils_1.merge)({}, restStartStyle, {
171
+ text: startTextFormat ? startTextFormat(this._startValue) : this._startValue,
196
172
  x: position.x + start * width,
197
- y: position.y + height / 2
198
- }, endTextPosition = {
173
+ y: position.y + height / 2,
174
+ visible: this._showText,
175
+ pickable: !1,
176
+ childrenPickable: !1,
177
+ textStyle: {
178
+ textAlign: "right",
179
+ textBaseline: "middle"
180
+ }
181
+ }), `data-zoom-start-text-${position}`), this._endText = this.maybeAddLabel(this._container, (0,
182
+ vutils_1.merge)({}, restEndTextStyle, {
183
+ text: endTextFormat ? endTextFormat(this._endValue) : this._endValue,
199
184
  x: position.x + end * width,
200
- y: position.y + height / 2
201
- }, startTextAlignStyle = {
202
- textAlign: this.isTextOverflow(componentBoundsLike, startTextBounds, "start") ? "left" : "right",
203
- textBaseline: "middle"
204
- }, endTextAlignStyle = {
205
- textAlign: this.isTextOverflow(componentBoundsLike, endTextBounds, "end") ? "right" : "left",
206
- textBaseline: "middle"
207
- }) : (startTextPosition = {
208
- x: position.x + width / 2,
209
- y: position.y + start * height
210
- }, endTextPosition = {
185
+ y: position.y + height / 2,
186
+ visible: this._showText,
187
+ pickable: !1,
188
+ childrenPickable: !1,
189
+ textStyle: {
190
+ textAlign: "left",
191
+ textBaseline: "middle"
192
+ }
193
+ }), `data-zoom-end-text-${position}`)) : (this._startText = this.maybeAddLabel(this._container, (0,
194
+ vutils_1.merge)({}, restStartStyle, {
195
+ text: startTextFormat ? startTextFormat(this._startValue) : this._startValue,
211
196
  x: position.x + width / 2,
212
- y: position.y + end * height
213
- }, startTextAlignStyle = {
214
- textAlign: "center",
215
- textBaseline: this.isTextOverflow(componentBoundsLike, startTextBounds, "start") ? "top" : "bottom"
216
- }, endTextAlignStyle = {
217
- textAlign: "center",
218
- textBaseline: this.isTextOverflow(componentBoundsLike, endTextBounds, "end") ? "bottom" : "top"
219
- }), this._startText = this.maybeAddLabel(this._container, (0, vutils_1.merge)({}, restStartTextStyle, {
220
- text: startTextValue,
221
- x: startTextPosition.x,
222
- y: startTextPosition.y,
197
+ y: position.y + start * height,
223
198
  visible: this._showText,
224
199
  pickable: !1,
225
200
  childrenPickable: !1,
226
- textStyle: startTextAlignStyle
201
+ textStyle: {
202
+ textAlign: "center",
203
+ textBaseline: "bottom"
204
+ }
227
205
  }), `data-zoom-start-text-${position}`), this._endText = this.maybeAddLabel(this._container, (0,
228
206
  vutils_1.merge)({}, restEndTextStyle, {
229
- text: endTextValue,
230
- x: endTextPosition.x,
231
- y: endTextPosition.y,
207
+ text: endTextFormat ? endTextFormat(this._endValue) : this._endValue,
208
+ x: position.x + width / 2,
209
+ y: position.y + end * height,
232
210
  visible: this._showText,
233
211
  pickable: !1,
234
212
  childrenPickable: !1,
235
- textStyle: endTextAlignStyle
236
- }), `data-zoom-end-text-${position}`);
237
- }
238
- renderText() {
239
- let startTextBounds = null, endTextBounds = null;
240
- this.setTextAttr(startTextBounds, endTextBounds), startTextBounds = this._startText.AABBBounds,
241
- endTextBounds = this._endText.AABBBounds, this.setTextAttr(startTextBounds, endTextBounds),
242
- startTextBounds = this._startText.AABBBounds, endTextBounds = this._endText.AABBBounds;
243
- const {x1: x1, x2: x2, y1: y1, y2: y2} = startTextBounds, {dx: startTextDx = 0, dy: startTextDy = 0} = this.attribute.startTextStyle;
244
- if ((new vutils_1.Bounds).set(x1, y1, x2, y2).intersects(endTextBounds)) {
245
- const direction = "bottom" === this.attribute.orient || "right" === this.attribute.orient ? -1 : 1;
246
- this._isHorizontal ? this._startText.setAttribute("dy", startTextDy + direction * Math.abs(endTextBounds.y1 - endTextBounds.y2)) : this._startText.setAttribute("dx", startTextDx + direction * Math.abs(endTextBounds.x1 - endTextBounds.x2));
247
- } else this._isHorizontal ? this._startText.setAttribute("dy", startTextDy) : this._startText.setAttribute("dx", startTextDx);
213
+ textStyle: {
214
+ textAlign: "center",
215
+ textBaseline: "top"
216
+ }
217
+ }), `data-zoom-end-text-${position}`));
248
218
  }
249
219
  getLayoutAttrFromConfig() {
250
220
  var _a, _b, _c, _d;
@@ -276,72 +246,60 @@ class DataZoom extends base_1.AbstractComponent {
276
246
  render() {
277
247
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
278
248
  this._layoutAttrFromConfig = null;
279
- 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
- if (this._container = group, this._background = group.createOrUpdateChild("background", Object.assign(Object.assign({
249
+ const {orient: orient, backgroundStyle: backgroundStyle, backgroundChartStyle: backgroundChartStyle = {}, selectedBackgroundStyle: selectedBackgroundStyle = {}, selectedBackgroundChartStyle: selectedBackgroundChartStyle = {}, middleHandlerStyle: middleHandlerStyle = {}, startHandlerStyle: startHandlerStyle = {}, endHandlerStyle: endHandlerStyle = {}, brushSelect: brushSelect} = 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");
250
+ if (this._container = group, this._background = group.createOrUpdateChild("background", Object.assign({
281
251
  x: position.x,
282
252
  y: position.y,
283
253
  width: width,
284
254
  height: height,
285
255
  cursor: brushSelect ? "crosshair" : "auto"
286
- }, backgroundStyle), {
287
- pickable: !zoomLock
288
- }), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
256
+ }, backgroundStyle), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
289
257
  (null === (_d = backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group),
290
- brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
258
+ brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign({
291
259
  x: position.x + start * width,
292
260
  y: position.y,
293
261
  width: (end - start) * width,
294
262
  height: height,
295
263
  cursor: brushSelect ? "crosshair" : "move"
296
- }, selectedBackgroundStyle), {
297
- pickable: !zoomLock
298
- }), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
264
+ }, selectedBackgroundStyle), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign({
299
265
  x: position.x,
300
266
  y: position.y + start * height,
301
267
  width: width,
302
268
  height: (end - start) * height,
303
269
  cursor: brushSelect ? "crosshair" : "move"
304
- }, selectedBackgroundStyle), {
305
- pickable: !zoomLock
306
- }), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
270
+ }, selectedBackgroundStyle), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
307
271
  (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group),
308
- this._isHorizontal) {
272
+ this._showText && this.renderText(), this._isHorizontal) {
309
273
  if (middleHandlerStyle.visible) {
310
274
  const middleHandlerBackgroundSize = (null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10;
311
- this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
275
+ this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
312
276
  x: position.x + start * width,
313
277
  y: position.y - middleHandlerBackgroundSize,
314
278
  width: (end - start) * width,
315
279
  height: middleHandlerBackgroundSize
316
- }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), {
317
- pickable: !zoomLock
318
- }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
280
+ }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), "rect"),
281
+ this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
319
282
  x: position.x + (start + end) / 2 * width,
320
283
  y: position.y - middleHandlerBackgroundSize / 2,
321
284
  strokeBoundsBuffer: 0,
322
285
  angle: 0,
323
286
  symbolType: null !== (_k = null === (_j = middleHandlerStyle.icon) || void 0 === _j ? void 0 : _j.symbolType) && void 0 !== _k ? _k : "square"
324
- }, middleHandlerStyle.icon), {
325
- pickable: !zoomLock
326
- }), "symbol");
287
+ }, middleHandlerStyle.icon), "symbol");
327
288
  }
328
- this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
289
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
329
290
  x: position.x + start * width,
330
291
  y: position.y + height / 2,
331
292
  size: height,
332
293
  symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
333
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
334
- pickable: !zoomLock
335
- }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
294
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), "symbol"),
295
+ this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
336
296
  x: position.x + end * width,
337
297
  y: position.y + height / 2,
338
298
  size: height,
339
299
  symbolType: null !== (_m = endHandlerStyle.symbolType) && void 0 !== _m ? _m : "square"
340
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
341
- pickable: !zoomLock
342
- }), "symbol");
300
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), "symbol");
343
301
  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
- this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
302
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
345
303
  x: position.x + start * width - startHandlerWidth / 2,
346
304
  y: position.y + height / 2 - startHandlerHeight / 2,
347
305
  width: startHandlerWidth,
@@ -349,9 +307,7 @@ class DataZoom extends base_1.AbstractComponent {
349
307
  fill: "white",
350
308
  fillOpacity: 0,
351
309
  zIndex: 999
352
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), {
353
- pickable: !zoomLock
354
- }), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
310
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
355
311
  x: position.x + end * width - endHandlerWidth / 2,
356
312
  y: position.y + height / 2 - endHandlerHeight / 2,
357
313
  width: endHandlerWidth,
@@ -359,46 +315,37 @@ class DataZoom extends base_1.AbstractComponent {
359
315
  fill: "white",
360
316
  fillOpacity: 0,
361
317
  zIndex: 999
362
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), {
363
- pickable: !zoomLock
364
- }), "rect");
318
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect");
365
319
  } else {
366
320
  if (middleHandlerStyle.visible) {
367
321
  const middleHandlerBackgroundSize = (null === (_o = middleHandlerStyle.background) || void 0 === _o ? void 0 : _o.size) || 10;
368
- this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
322
+ this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
369
323
  x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
370
324
  y: position.y + start * height,
371
325
  width: middleHandlerBackgroundSize,
372
326
  height: (end - start) * height
373
- }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), {
374
- pickable: !zoomLock
375
- }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
327
+ }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), "rect"),
328
+ this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
376
329
  x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
377
330
  y: position.y + (start + end) / 2 * height,
378
331
  angle: Math.PI / 180 * 90,
379
332
  symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square",
380
333
  strokeBoundsBuffer: 0
381
- }, middleHandlerStyle.icon), {
382
- pickable: !zoomLock
383
- }), "symbol");
334
+ }, middleHandlerStyle.icon), "symbol");
384
335
  }
385
- this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
336
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
386
337
  x: position.x + width / 2,
387
338
  y: position.y + start * height,
388
339
  size: width,
389
340
  symbolType: null !== (_s = startHandlerStyle.symbolType) && void 0 !== _s ? _s : "square"
390
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
391
- pickable: !zoomLock
392
- }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
341
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
393
342
  x: position.x + width / 2,
394
343
  y: position.y + end * height,
395
344
  size: width,
396
345
  symbolType: null !== (_t = endHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
397
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
398
- pickable: !zoomLock
399
- }), "symbol");
346
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), "symbol");
400
347
  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
- this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
348
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
402
349
  x: position.x + width / 2 + startHandlerWidth / 2,
403
350
  y: position.y + start * height - startHandlerHeight / 2,
404
351
  width: endHandlerHeight,
@@ -406,9 +353,7 @@ class DataZoom extends base_1.AbstractComponent {
406
353
  fill: "white",
407
354
  fillOpacity: 0,
408
355
  zIndex: 999
409
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), {
410
- pickable: !zoomLock
411
- }), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
356
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
412
357
  x: position.x + width / 2 + endHandlerWidth / 2,
413
358
  y: position.y + end * height - endHandlerHeight / 2,
414
359
  width: endHandlerHeight,
@@ -416,11 +361,8 @@ class DataZoom extends base_1.AbstractComponent {
416
361
  fill: "white",
417
362
  fillOpacity: 0,
418
363
  zIndex: 999
419
- }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), {
420
- pickable: !zoomLock
421
- }), "rect");
364
+ }, config_1.DEFAULT_HANDLER_ATTR_MAP.vertical), "rect");
422
365
  }
423
- this._showText && this.renderText();
424
366
  }
425
367
  computeBasePoints() {
426
368
  const {orient: orient} = this.attribute, {position: position, width: width, height: height} = this.getLayoutAttrFromConfig();