@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/es/axis/util.js CHANGED
@@ -24,5 +24,4 @@ export function getLabelPosition(tickPosition, tickVector, text, style) {
24
24
  x: x,
25
25
  y: baseY - dy
26
26
  };
27
- }
28
- //# sourceMappingURL=util.js.map
27
+ }
package/es/brush/type.js CHANGED
@@ -4,4 +4,5 @@ export var IOperateType;
4
4
  IOperateType.drawStart = "drawStart", IOperateType.drawEnd = "drawEnd", IOperateType.drawing = "drawing",
5
5
  IOperateType.moving = "moving", IOperateType.moveStart = "moveStart", IOperateType.moveEnd = "moveEnd",
6
6
  IOperateType.brushClear = "brushClear";
7
- }(IOperateType || (IOperateType = {}));
7
+ }(IOperateType || (IOperateType = {}));
8
+ //# sourceMappingURL=type.js.map
@@ -1,5 +1,6 @@
1
1
  import type { FederatedPointerEvent, IGroup } from '@visactor/vrender-core';
2
- import type { IPointLike } from '@visactor/vutils';
2
+ import type { IBoundsLike, IPointLike, ITextMeasureSpec } from '@visactor/vutils';
3
+ import { TextMeasure } from '@visactor/vutils';
3
4
  import { AbstractComponent } from '../core/base';
4
5
  import type { TagAttributes } from '../tag';
5
6
  import { Tag } from '../tag';
@@ -154,7 +155,9 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
154
155
  private _previewPointsY1;
155
156
  private _statePointToData;
156
157
  private _layoutAttrFromConfig;
158
+ setPropsFromAttrs(): void;
157
159
  constructor(attributes: DataZoomAttributes, options?: ComponentOptions);
160
+ setAttributes(params: Partial<Required<DataZoomAttributes>>, forceUpdateTag?: boolean): void;
158
161
  protected bindEvents(): void;
159
162
  protected dragMaskSize(): number;
160
163
  protected setStateAttr(start: number, end: number, shouldRender: boolean): void;
@@ -170,6 +173,7 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
170
173
  protected backgroundDragZoom(startPos: IPointLike, endPos: IPointLike): void;
171
174
  protected moveZoomWithMiddle(middle: number): void;
172
175
  protected renderDragMask(): void;
176
+ protected isTextOverflow(componentBoundsLike: IBoundsLike, textPosition: IPointLike, textMeasure: TextMeasure<ITextMeasureSpec>, textValue: string | number | (string | number)[], layout: 'start' | 'end'): boolean;
173
177
  protected renderText(): void;
174
178
  protected getLayoutAttrFromConfig(): any;
175
179
  protected render(): void;
@@ -10,6 +10,8 @@ var __rest = this && this.__rest || function(s, e) {
10
10
 
11
11
  import { vglobal } from "@visactor/vrender-core";
12
12
 
13
+ import { TextMeasure } from "@visactor/vutils";
14
+
13
15
  import { array, clamp, debounce, isFunction, isValid, merge, throttle } from "@visactor/vutils";
14
16
 
15
17
  import { AbstractComponent } from "../core/base";
@@ -30,6 +32,16 @@ const delayMap = {
30
32
  loadDataZoomComponent();
31
33
 
32
34
  export class DataZoom extends AbstractComponent {
35
+ setPropsFromAttrs() {
36
+ const {start: start, end: end, orient: orient, previewData: previewData, previewPointsX: previewPointsX, previewPointsY: previewPointsY, previewPointsX1: previewPointsX1, previewPointsY1: previewPointsY1} = this.attribute;
37
+ start && (this.state.start = start), end && (this.state.end = end);
38
+ const {width: width, height: height} = this.getLayoutAttrFromConfig();
39
+ this._spanCache = this.state.end - this.state.start, this._isHorizontal = "top" === orient || "bottom" === orient,
40
+ this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y",
41
+ this._layoutCache.attSize = this._isHorizontal ? "width" : "height", previewData && (this._previewData = previewData),
42
+ isFunction(previewPointsX) && (this._previewPointsX = previewPointsX), isFunction(previewPointsY) && (this._previewPointsY = previewPointsY),
43
+ isFunction(previewPointsX1) && (this._previewPointsX1 = previewPointsX1), isFunction(previewPointsY1) && (this._previewPointsY1 = previewPointsY1);
44
+ }
33
45
  constructor(attributes, options) {
34
46
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, DataZoom.defaultAttributes, attributes)),
35
47
  this.name = "dataZoom", this._previewData = [], this._activeState = !1, this._activeCache = {
@@ -76,14 +88,12 @@ export class DataZoom extends AbstractComponent {
76
88
  tag: this._activeTag
77
89
  }));
78
90
  }), this.attribute.delayTime);
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",
91
+ const {position: position, showDetail: showDetail} = attributes;
83
92
  this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail,
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);
93
+ this.setPropsFromAttrs();
94
+ }
95
+ setAttributes(params, forceUpdateTag) {
96
+ super.setAttributes(params, forceUpdateTag), this.setPropsFromAttrs();
87
97
  }
88
98
  bindEvents() {
89
99
  if (this.attribute.disableTriggerEvent) return;
@@ -169,55 +179,74 @@ export class DataZoom extends AbstractComponent {
169
179
  height: this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize()) || 0
170
180
  }, dragMaskStyle), "rect");
171
181
  }
182
+ isTextOverflow(componentBoundsLike, textPosition, textMeasure, textValue, layout) {
183
+ const {width: textWidth, height: textHeight} = textMeasure.fullMeasure(textValue);
184
+ if (this._isHorizontal) if ("start" === layout) {
185
+ if (textPosition.x - textWidth < componentBoundsLike.x1) return !0;
186
+ } else {
187
+ if (textPosition.x + textWidth > componentBoundsLike.x2) return !0;
188
+ } else if ("start" === layout) {
189
+ if (textPosition.y - textHeight < componentBoundsLike.y1) return !0;
190
+ } else {
191
+ if (textPosition.y + textHeight > componentBoundsLike.y2) return !0;
192
+ }
193
+ return !1;
194
+ }
172
195
  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;
196
+ 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;
174
197
  this._startValue = this._statePointToData(start), this._endValue = this._statePointToData(end);
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,
198
+ const {position: position, width: width, height: height} = this.getLayoutAttrFromConfig(), startTextValue = startTextFormat ? startTextFormat(this._startValue) : this._startValue, endTextValue = endTextFormat ? endTextFormat(this._endValue) : this._endValue, startTextMeasure = new TextMeasure({
199
+ defaultFontParams: restStartTextStyle.textStyle
200
+ }), endTextMeasure = new TextMeasure({
201
+ defaultFontParams: restEndTextStyle.textStyle
202
+ }), componentBoundsLike = {
203
+ x1: position.x,
204
+ y1: position.y,
205
+ x2: position.x + width,
206
+ y2: position.y + height
207
+ };
208
+ let startTextPosition, endTextPosition, startTextAlignStyle, endTextAlignStyle;
209
+ this._isHorizontal ? (startTextPosition = {
178
210
  x: position.x + start * width,
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,
211
+ y: position.y + height / 2
212
+ }, endTextPosition = {
189
213
  x: position.x + end * width,
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,
214
+ y: position.y + height / 2
215
+ }, startTextAlignStyle = {
216
+ textAlign: this.isTextOverflow(componentBoundsLike, startTextPosition, startTextMeasure, startTextValue, "start") ? "left" : "right",
217
+ textBaseline: "middle"
218
+ }, endTextAlignStyle = {
219
+ textAlign: this.isTextOverflow(componentBoundsLike, endTextPosition, endTextMeasure, endTextValue, "end") ? "right" : "left",
220
+ textBaseline: "middle"
221
+ }) : (startTextPosition = {
200
222
  x: position.x + width / 2,
201
- y: position.y + start * height,
223
+ y: position.y + start * height
224
+ }, endTextPosition = {
225
+ x: position.x + width / 2,
226
+ y: position.y + end * height
227
+ }, startTextAlignStyle = {
228
+ textAlign: "center",
229
+ textBaseline: this.isTextOverflow(componentBoundsLike, startTextPosition, startTextMeasure, startTextValue, "start") ? "top" : "bottom"
230
+ }, endTextAlignStyle = {
231
+ textAlign: "center",
232
+ textBaseline: this.isTextOverflow(componentBoundsLike, endTextPosition, endTextMeasure, endTextValue, "end") ? "bottom" : "top"
233
+ }), this._startText = this.maybeAddLabel(this._container, merge({}, restStartTextStyle, {
234
+ text: startTextValue,
235
+ x: startTextPosition.x,
236
+ y: startTextPosition.y,
202
237
  visible: this._showText,
203
238
  pickable: !1,
204
239
  childrenPickable: !1,
205
- textStyle: {
206
- textAlign: "center",
207
- textBaseline: "bottom"
208
- }
240
+ textStyle: startTextAlignStyle
209
241
  }), `data-zoom-start-text-${position}`), this._endText = this.maybeAddLabel(this._container, merge({}, restEndTextStyle, {
210
- text: endTextFormat ? endTextFormat(this._endValue) : this._endValue,
211
- x: position.x + width / 2,
212
- y: position.y + end * height,
242
+ text: endTextValue,
243
+ x: endTextPosition.x,
244
+ y: endTextPosition.y,
213
245
  visible: this._showText,
214
246
  pickable: !1,
215
247
  childrenPickable: !1,
216
- textStyle: {
217
- textAlign: "center",
218
- textBaseline: "top"
219
- }
220
- }), `data-zoom-end-text-${position}`));
248
+ textStyle: endTextAlignStyle
249
+ }), `data-zoom-end-text-${position}`);
221
250
  }
222
251
  getLayoutAttrFromConfig() {
223
252
  var _a, _b, _c, _d;
@@ -249,59 +278,72 @@ export class DataZoom extends AbstractComponent {
249
278
  render() {
250
279
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
251
280
  this._layoutAttrFromConfig = null;
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({
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");
282
+ if (this._container = group, this._background = group.createOrUpdateChild("background", Object.assign(Object.assign({
254
283
  x: position.x,
255
284
  y: position.y,
256
285
  width: width,
257
286
  height: height,
258
287
  cursor: brushSelect ? "crosshair" : "auto"
259
- }, backgroundStyle), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
288
+ }, backgroundStyle), {
289
+ pickable: !zoomLock
290
+ }), "rect"), (null === (_c = backgroundChartStyle.line) || void 0 === _c ? void 0 : _c.visible) && this.setPreviewAttributes("line", group),
260
291
  (null === (_d = backgroundChartStyle.area) || void 0 === _d ? void 0 : _d.visible) && this.setPreviewAttributes("area", group),
261
- brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign({
292
+ brushSelect && this.renderDragMask(), this._isHorizontal ? this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
262
293
  x: position.x + start * width,
263
294
  y: position.y,
264
295
  width: (end - start) * width,
265
296
  height: height,
266
297
  cursor: brushSelect ? "crosshair" : "move"
267
- }, selectedBackgroundStyle), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign({
298
+ }, selectedBackgroundStyle), {
299
+ pickable: !zoomLock
300
+ }), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
268
301
  x: position.x,
269
302
  y: position.y + start * height,
270
303
  width: width,
271
304
  height: (end - start) * height,
272
305
  cursor: brushSelect ? "crosshair" : "move"
273
- }, selectedBackgroundStyle), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
306
+ }, selectedBackgroundStyle), {
307
+ pickable: !zoomLock
308
+ }), "rect"), (null === (_e = selectedBackgroundChartStyle.line) || void 0 === _e ? void 0 : _e.visible) && this.setSelectedPreviewAttributes("line", group),
274
309
  (null === (_f = selectedBackgroundChartStyle.area) || void 0 === _f ? void 0 : _f.visible) && this.setSelectedPreviewAttributes("area", group),
275
310
  this._showText && this.renderText(), this._isHorizontal) {
276
311
  if (middleHandlerStyle.visible) {
277
312
  const middleHandlerBackgroundSize = (null === (_g = middleHandlerStyle.background) || void 0 === _g ? void 0 : _g.size) || 10;
278
- this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
313
+ this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
279
314
  x: position.x + start * width,
280
315
  y: position.y - middleHandlerBackgroundSize,
281
316
  width: (end - start) * width,
282
317
  height: middleHandlerBackgroundSize
283
- }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), "rect"),
284
- this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
318
+ }, null === (_h = middleHandlerStyle.background) || void 0 === _h ? void 0 : _h.style), {
319
+ pickable: !zoomLock
320
+ }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
285
321
  x: position.x + (start + end) / 2 * width,
286
322
  y: position.y - middleHandlerBackgroundSize / 2,
287
323
  strokeBoundsBuffer: 0,
288
324
  angle: 0,
289
325
  symbolType: null !== (_k = null === (_j = middleHandlerStyle.icon) || void 0 === _j ? void 0 : _j.symbolType) && void 0 !== _k ? _k : "square"
290
- }, middleHandlerStyle.icon), "symbol");
326
+ }, middleHandlerStyle.icon), {
327
+ pickable: !zoomLock
328
+ }), "symbol");
291
329
  }
292
- this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
330
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
293
331
  x: position.x + start * width,
294
332
  y: position.y + height / 2,
295
333
  size: height,
296
334
  symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
297
- }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
335
+ }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
336
+ pickable: !zoomLock
337
+ }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
298
338
  x: position.x + end * width,
299
339
  y: position.y + height / 2,
300
340
  size: height,
301
341
  symbolType: null !== (_m = endHandlerStyle.symbolType) && void 0 !== _m ? _m : "square"
302
- }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), "symbol");
342
+ }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
343
+ pickable: !zoomLock
344
+ }), "symbol");
303
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);
304
- this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
346
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
305
347
  x: position.x + start * width - startHandlerWidth / 2,
306
348
  y: position.y + height / 2 - startHandlerHeight / 2,
307
349
  width: startHandlerWidth,
@@ -309,7 +351,9 @@ export class DataZoom extends AbstractComponent {
309
351
  fill: "white",
310
352
  fillOpacity: 0,
311
353
  zIndex: 999
312
- }, DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
354
+ }, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
355
+ pickable: !zoomLock
356
+ }), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
313
357
  x: position.x + end * width - endHandlerWidth / 2,
314
358
  y: position.y + height / 2 - endHandlerHeight / 2,
315
359
  width: endHandlerWidth,
@@ -317,37 +361,46 @@ export class DataZoom extends AbstractComponent {
317
361
  fill: "white",
318
362
  fillOpacity: 0,
319
363
  zIndex: 999
320
- }, DEFAULT_HANDLER_ATTR_MAP.horizontal), "rect");
364
+ }, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
365
+ pickable: !zoomLock
366
+ }), "rect");
321
367
  } else {
322
368
  if (middleHandlerStyle.visible) {
323
369
  const middleHandlerBackgroundSize = (null === (_o = middleHandlerStyle.background) || void 0 === _o ? void 0 : _o.size) || 10;
324
- this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign({
370
+ this._middleHandlerRect = group.createOrUpdateChild("middleHandlerRect", Object.assign(Object.assign({
325
371
  x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
326
372
  y: position.y + start * height,
327
373
  width: middleHandlerBackgroundSize,
328
374
  height: (end - start) * height
329
- }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), "rect"),
330
- this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign({
375
+ }, null === (_p = middleHandlerStyle.background) || void 0 === _p ? void 0 : _p.style), {
376
+ pickable: !zoomLock
377
+ }), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
331
378
  x: "left" === orient ? position.x - middleHandlerBackgroundSize / 2 : position.x + width + middleHandlerBackgroundSize / 2,
332
379
  y: position.y + (start + end) / 2 * height,
333
380
  angle: Math.PI / 180 * 90,
334
381
  symbolType: null !== (_r = null === (_q = middleHandlerStyle.icon) || void 0 === _q ? void 0 : _q.symbolType) && void 0 !== _r ? _r : "square",
335
382
  strokeBoundsBuffer: 0
336
- }, middleHandlerStyle.icon), "symbol");
383
+ }, middleHandlerStyle.icon), {
384
+ pickable: !zoomLock
385
+ }), "symbol");
337
386
  }
338
- this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign({
387
+ this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
339
388
  x: position.x + width / 2,
340
389
  y: position.y + start * height,
341
390
  size: width,
342
391
  symbolType: null !== (_s = startHandlerStyle.symbolType) && void 0 !== _s ? _s : "square"
343
- }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign({
392
+ }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
393
+ pickable: !zoomLock
394
+ }), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
344
395
  x: position.x + width / 2,
345
396
  y: position.y + end * height,
346
397
  size: width,
347
398
  symbolType: null !== (_t = endHandlerStyle.symbolType) && void 0 !== _t ? _t : "square"
348
- }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), "symbol");
399
+ }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
400
+ pickable: !zoomLock
401
+ }), "symbol");
349
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);
350
- this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign({
403
+ this._startHandlerMask = group.createOrUpdateChild("startHandlerMask", Object.assign(Object.assign({
351
404
  x: position.x + width / 2 + startHandlerWidth / 2,
352
405
  y: position.y + start * height - startHandlerHeight / 2,
353
406
  width: endHandlerHeight,
@@ -355,7 +408,9 @@ export class DataZoom extends AbstractComponent {
355
408
  fill: "white",
356
409
  fillOpacity: 0,
357
410
  zIndex: 999
358
- }, DEFAULT_HANDLER_ATTR_MAP.vertical), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign({
411
+ }, DEFAULT_HANDLER_ATTR_MAP.vertical), {
412
+ pickable: !zoomLock
413
+ }), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
359
414
  x: position.x + width / 2 + endHandlerWidth / 2,
360
415
  y: position.y + end * height - endHandlerHeight / 2,
361
416
  width: endHandlerHeight,
@@ -363,7 +418,9 @@ export class DataZoom extends AbstractComponent {
363
418
  fill: "white",
364
419
  fillOpacity: 0,
365
420
  zIndex: 999
366
- }, DEFAULT_HANDLER_ATTR_MAP.vertical), "rect");
421
+ }, DEFAULT_HANDLER_ATTR_MAP.vertical), {
422
+ pickable: !zoomLock
423
+ }), "rect");
367
424
  }
368
425
  }
369
426
  computeBasePoints() {