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