@visactor/vrender-components 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -207,13 +207,8 @@
207
207
  this._reset();
208
208
  const { direction = 'horizontal', width, height, range, limitRange = [0, 1], railStyle, sliderStyle, padding = 2 } = this.attribute;
209
209
  const group = this.createOrUpdateChild('scrollbar-container', {}, 'group');
210
- const rail = group.createOrUpdateChild('scrollbar-rail', {
211
- x: 0,
212
- y: 0,
213
- width,
214
- height,
215
- ...railStyle
216
- }, 'rect');
210
+ const rail = group.createOrUpdateChild('scrollbar-rail', Object.assign({ x: 0, y: 0, width,
211
+ height }, railStyle), 'rect');
217
212
  this._rail = rail;
218
213
  const sliderRenderBounds = this._getSliderRenderBounds();
219
214
  const sliderPos = this._getSliderPos(vutils.clampRange(range, limitRange[0], limitRange[1]));
@@ -236,13 +231,7 @@
236
231
  height: sliderSize
237
232
  };
238
233
  }
239
- const slider = group.createOrUpdateChild('slider', {
240
- ...sliderAttribute,
241
- cornerRadius: this._getDefaultSliderCornerRadius(),
242
- ...sliderStyle,
243
- boundsPadding: vutils.normalizePadding(padding),
244
- pickMode: 'imprecise'
245
- }, 'rect');
234
+ const slider = group.createOrUpdateChild('slider', Object.assign(Object.assign(Object.assign(Object.assign({}, sliderAttribute), { cornerRadius: this._getDefaultSliderCornerRadius() }), sliderStyle), { boundsPadding: vutils.normalizePadding(padding), pickMode: 'imprecise' }), 'rect');
246
235
  this._slider = slider;
247
236
  this._container = group;
248
237
  const containerAABBBounds = this._container.AABBBounds;
@@ -321,6 +310,63 @@
321
310
  scrollRange: [0, 1]
322
311
  };
323
312
 
313
+ function _typeof(obj) {
314
+ "@babel/helpers - typeof";
315
+
316
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
317
+ return typeof obj;
318
+ } : function (obj) {
319
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
320
+ }, _typeof(obj);
321
+ }
322
+
323
+ function __rest(s, e) {
324
+ var t = {};
325
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
326
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
327
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
328
+ }
329
+ return t;
330
+ }
331
+ function __decorate(decorators, target, key, desc) {
332
+ var c = arguments.length,
333
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
334
+ d;
335
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
336
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
337
+ }
338
+ function __awaiter(thisArg, _arguments, P, generator) {
339
+ function adopt(value) {
340
+ return value instanceof P ? value : new P(function (resolve) {
341
+ resolve(value);
342
+ });
343
+ }
344
+ return new (P || (P = Promise))(function (resolve, reject) {
345
+ function fulfilled(value) {
346
+ try {
347
+ step(generator.next(value));
348
+ } catch (e) {
349
+ reject(e);
350
+ }
351
+ }
352
+ function rejected(value) {
353
+ try {
354
+ step(generator["throw"](value));
355
+ } catch (e) {
356
+ reject(e);
357
+ }
358
+ }
359
+ function step(result) {
360
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
361
+ }
362
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
363
+ });
364
+ }
365
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
366
+ var e = new Error(message);
367
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
368
+ };
369
+
324
370
  function traverseGroup(group, cb) {
325
371
  group.forEachChildren(node => {
326
372
  const stopped = cb(node);
@@ -509,15 +555,10 @@
509
555
  };
510
556
 
511
557
  const initTextMeasure = (textSpec, option, useNaiveCanvas) => {
512
- return new vutils.TextMeasure({
513
- defaultFontParams: {
558
+ return new vutils.TextMeasure(Object.assign({ defaultFontParams: {
514
559
  fontFamily: DEFAULT_TEXT_FONT_FAMILY,
515
560
  fontSize: DEFAULT_TEXT_FONT_SIZE
516
- },
517
- getTextBounds: useNaiveCanvas ? undefined : vrender.getTextBounds,
518
- specialCharSet: '-/: .,@%\'"~' + vutils.TextMeasure.ALPHABET_CHAR_SET + vutils.TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),
519
- ...(option !== null && option !== void 0 ? option : {})
520
- }, textSpec);
561
+ }, getTextBounds: useNaiveCanvas ? undefined : vrender.getTextBounds, specialCharSet: '-/: .,@%\'"~' + vutils.TextMeasure.ALPHABET_CHAR_SET + vutils.TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
521
562
  };
522
563
  function measureTextSize(text, textSpec) {
523
564
  var _a, _b;
@@ -553,19 +594,11 @@
553
594
  let tagHeight = parsedPadding[0] + parsedPadding[2];
554
595
  let textX = 0;
555
596
  let symbolPlaceWidth = 0;
556
- const { visible: shapeVisible, ...shapeStyle } = shape;
597
+ const { visible: shapeVisible } = shape, shapeStyle = __rest(shape, ["visible"]);
557
598
  if (vutils.isBoolean(shapeVisible)) {
558
599
  const size = (shapeStyle === null || shapeStyle === void 0 ? void 0 : shapeStyle.size) || 10;
559
600
  const maxSize = vutils.isNumber(size) ? size : Math.max(size[0], size[1]);
560
- symbol = group.createOrUpdateChild('tag-shape', {
561
- symbolType: 'circle',
562
- size,
563
- strokeBoundsBuffer: 0,
564
- ...shapeStyle,
565
- visible: shapeVisible,
566
- x: maxSize / 2,
567
- y: maxSize / 2
568
- }, 'symbol');
601
+ symbol = group.createOrUpdateChild('tag-shape', Object.assign(Object.assign({ symbolType: 'circle', size, strokeBoundsBuffer: 0 }, shapeStyle), { visible: shapeVisible, x: maxSize / 2, y: maxSize / 2 }), 'symbol');
569
602
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.shape)) {
570
603
  symbol.states = state.shape;
571
604
  }
@@ -575,14 +608,7 @@
575
608
  }
576
609
  tagWidth += symbolPlaceWidth;
577
610
  textX += symbolPlaceWidth;
578
- const textAttrs = {
579
- text,
580
- visible: vutils.isValid(text) && visible !== false,
581
- lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize,
582
- ...textStyle,
583
- x: textX,
584
- y: 0
585
- };
611
+ const textAttrs = Object.assign(Object.assign({ text, visible: vutils.isValid(text) && visible !== false, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }, textStyle), { x: textX, y: 0 });
586
612
  if (vutils.isNil(textAttrs.lineHeight)) {
587
613
  textAttrs.lineHeight = textAttrs.fontSize;
588
614
  }
@@ -645,16 +671,10 @@
645
671
  symbol.setAttribute('y', textHeight / 2);
646
672
  }
647
673
  }
648
- const { visible: bgVisible, ...backgroundStyle } = panel;
674
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
649
675
  if (visible && vutils.isBoolean(bgVisible)) {
650
- const bgRect = this.createOrUpdateChild('tag-panel', {
651
- ...backgroundStyle,
652
- visible: bgVisible && !!text,
653
- x,
654
- y,
655
- width: tagWidth,
656
- height: tagHeight
657
- }, 'rect');
676
+ const bgRect = this.createOrUpdateChild('tag-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && !!text, x,
677
+ y, width: tagWidth, height: tagHeight }), 'rect');
658
678
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
659
679
  bgRect.states = state.panel;
660
680
  }
@@ -689,16 +709,7 @@
689
709
  const group = this.createOrUpdateChild('poptip-content', { x: 0, y: 0, zIndex: 1 }, 'group');
690
710
  const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3];
691
711
  const titleVisible = vutils.isValid(title) && visible !== false;
692
- const titleAttrs = {
693
- text: title,
694
- visible: titleVisible,
695
- ...titleStyle,
696
- x: parsedPadding[3],
697
- y: parsedPadding[0],
698
- maxLineWidth,
699
- textAlign: 'left',
700
- textBaseline: 'top'
701
- };
712
+ const titleAttrs = Object.assign(Object.assign({ text: title, visible: titleVisible }, titleStyle), { x: parsedPadding[3], y: parsedPadding[0], maxLineWidth, textAlign: 'left', textBaseline: 'top' });
702
713
  const titleShape = group.createOrUpdateChild('poptip-title', titleAttrs, 'text');
703
714
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.title)) {
704
715
  titleShape.states = state.title;
@@ -711,16 +722,7 @@
711
722
  height = 0;
712
723
  }
713
724
  const contentVisible = vutils.isValid(content) && visible !== false;
714
- const contentAttrs = {
715
- text: content,
716
- visible: contentVisible,
717
- ...contentStyle,
718
- x: parsedPadding[3],
719
- y: parsedPadding[0] + height,
720
- maxLineWidth,
721
- textAlign: 'left',
722
- textBaseline: 'top'
723
- };
725
+ const contentAttrs = Object.assign(Object.assign({ text: content, visible: contentVisible }, contentStyle), { x: parsedPadding[3], y: parsedPadding[0] + height, maxLineWidth, textAlign: 'left', textBaseline: 'top' });
724
726
  const contentShape = group.createOrUpdateChild('poptip-content', contentAttrs, 'text');
725
727
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.content)) {
726
728
  contentShape.states = state.content;
@@ -739,7 +741,7 @@
739
741
  popTipWidth = minWidth;
740
742
  }
741
743
  const poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
742
- const { visible: bgVisible, ...backgroundStyle } = panel;
744
+ const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
743
745
  const symbolSize = (_a = backgroundStyle.size) !== null && _a !== void 0 ? _a : 12;
744
746
  const spaceSize = vutils.isArray(symbolSize)
745
747
  ? [symbolSize[0] + ((_b = backgroundStyle.space) !== null && _b !== void 0 ? _b : 0), symbolSize[1] + ((_c = backgroundStyle.space) !== null && _c !== void 0 ? _c : 0)]
@@ -756,33 +758,11 @@
756
758
  const { angle, offset, rectOffset } = this.getAngleAndOffset(p, popTipWidth, poptipHeight, vutils.isArray(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth]);
757
759
  if (vutils.isBoolean(bgVisible)) {
758
760
  const offsetX = (vutils.isArray(symbolSize) ? symbolSize[0] : symbolSize) / 4;
759
- const bgSymbol = group.createOrUpdateChild('poptip-symbol-panel', {
760
- ...backgroundStyle,
761
- visible: bgVisible && (contentVisible || titleVisible),
762
- x: offsetX,
763
- y: 0,
764
- strokeBoundsBuffer: -1,
765
- boundsPadding: -2,
766
- anchor: [0, 0],
767
- symbolType: 'arrow2Left',
768
- angle: angle,
769
- dx: offset[0],
770
- dy: offset[1],
771
- size: symbolSize,
772
- zIndex: -9
773
- }, 'symbol');
761
+ const bgSymbol = group.createOrUpdateChild('poptip-symbol-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && (contentVisible || titleVisible), x: offsetX, y: 0, strokeBoundsBuffer: -1, boundsPadding: -2, anchor: [0, 0], symbolType: 'arrow2Left', angle: angle, dx: offset[0], dy: offset[1], size: symbolSize, zIndex: -9 }), 'symbol');
774
762
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
775
763
  bgSymbol.states = state.panel;
776
764
  }
777
- const bgRect = group.createOrUpdateChild('poptip-rect-panel', {
778
- ...backgroundStyle,
779
- visible: bgVisible && (contentVisible || titleVisible),
780
- x: 0,
781
- y: 0,
782
- width: popTipWidth,
783
- height: poptipHeight,
784
- zIndex: -8
785
- }, 'rect');
765
+ const bgRect = group.createOrUpdateChild('poptip-rect-panel', Object.assign(Object.assign({}, backgroundStyle), { visible: bgVisible && (contentVisible || titleVisible), x: 0, y: 0, width: popTipWidth, height: poptipHeight, zIndex: -8 }), 'rect');
786
766
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.panel)) {
787
767
  bgRect.states = state.panel;
788
768
  }
@@ -877,16 +857,6 @@
877
857
  var PARAM_TYPES = "inversify:paramtypes";
878
858
  var DESIGN_PARAM_TYPES = "design:paramtypes";
879
859
 
880
- function _typeof(obj) {
881
- "@babel/helpers - typeof";
882
-
883
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
884
- return typeof obj;
885
- } : function (obj) {
886
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
887
- }, _typeof(obj);
888
- }
889
-
890
860
  var idCounter = 0;
891
861
  function id() {
892
862
  return idCounter++;
@@ -913,18 +883,6 @@
913
883
  };
914
884
  }
915
885
 
916
- function __decorate(decorators, target, key, desc) {
917
- var c = arguments.length,
918
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
919
- d;
920
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
921
- return c > 3 && r && Object.defineProperty(target, key, r), r;
922
- }
923
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
924
- var e = new Error(message);
925
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
926
- };
927
-
928
886
  const DEFAULT_THEME = {
929
887
  visible: true,
930
888
  position: 'auto',
@@ -973,14 +931,7 @@
973
931
  poptip.content = (_a = poptip.content) !== null && _a !== void 0 ? _a : graphic.attribute.text;
974
932
  }
975
933
  const matrix = graphic.globalTransMatrix;
976
- this.poptipComponent.setAttributes({
977
- visibleAll: true,
978
- pickable: false,
979
- childrenPickable: false,
980
- ...poptip,
981
- x: matrix.e,
982
- y: matrix.f
983
- });
934
+ this.poptipComponent.setAttributes(Object.assign(Object.assign({ visibleAll: true, pickable: false, childrenPickable: false }, poptip), { x: matrix.e, y: matrix.f }));
984
935
  drawContext.stage.tryInitInteractiveLayer();
985
936
  const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
986
937
  if (interactiveLayer) {
@@ -1137,10 +1088,7 @@
1137
1088
  }
1138
1089
  renderCrosshair(container) {
1139
1090
  const { start, end, lineStyle } = this.attribute;
1140
- const line = container.createOrUpdateChild('crosshair-line', {
1141
- points: [start, end],
1142
- ...lineStyle
1143
- }, 'line');
1091
+ const line = container.createOrUpdateChild('crosshair-line', Object.assign({ points: [start, end] }, lineStyle), 'line');
1144
1092
  return line;
1145
1093
  }
1146
1094
  setLocation(region) {
@@ -1165,13 +1113,7 @@
1165
1113
  }
1166
1114
  renderCrosshair(container) {
1167
1115
  const { start, end, rectStyle } = this.attribute;
1168
- const rect = container.createOrUpdateChild('crosshair-rect', {
1169
- x: start.x,
1170
- y: start.y,
1171
- width: end.x - start.x,
1172
- height: end.y - start.y,
1173
- ...rectStyle
1174
- }, 'rect');
1116
+ const rect = container.createOrUpdateChild('crosshair-rect', Object.assign({ x: start.x, y: start.y, width: end.x - start.x, height: end.y - start.y }, rectStyle), 'rect');
1175
1117
  return rect;
1176
1118
  }
1177
1119
  setLocation(region) {
@@ -1195,12 +1137,7 @@
1195
1137
  }
1196
1138
  renderCrosshair(container) {
1197
1139
  const { center, radius, lineStyle } = this.attribute;
1198
- const circle = container.createOrUpdateChild('crosshair-circle', {
1199
- ...center,
1200
- outerRadius: radius,
1201
- ...this.attribute,
1202
- ...lineStyle
1203
- }, 'arc');
1140
+ const circle = container.createOrUpdateChild('crosshair-circle', Object.assign(Object.assign(Object.assign(Object.assign({}, center), { outerRadius: radius }), this.attribute), lineStyle), 'arc');
1204
1141
  return circle;
1205
1142
  }
1206
1143
  setLocation(point) {
@@ -1224,14 +1161,9 @@
1224
1161
  renderCrosshair(container) {
1225
1162
  const { center, radius, innerRadius = 0, sectorStyle } = this.attribute;
1226
1163
  const { startAngle, endAngle } = this.attribute;
1227
- const circle = container.createOrUpdateChild('crosshair-sector', {
1228
- ...center,
1229
- outerRadius: radius,
1230
- innerRadius,
1164
+ const circle = container.createOrUpdateChild('crosshair-sector', Object.assign(Object.assign(Object.assign({}, center), { outerRadius: radius, innerRadius,
1231
1165
  startAngle,
1232
- endAngle,
1233
- ...sectorStyle
1234
- }, 'arc');
1166
+ endAngle }), sectorStyle), 'arc');
1235
1167
  return circle;
1236
1168
  }
1237
1169
  setLocation(point) {
@@ -1274,10 +1206,7 @@
1274
1206
  path += 'Z';
1275
1207
  }
1276
1208
  }
1277
- const polygon = container.createOrUpdateChild('crosshair-polygon', {
1278
- path,
1279
- ...lineStyle
1280
- }, 'path');
1209
+ const polygon = container.createOrUpdateChild('crosshair-polygon', Object.assign({ path }, lineStyle), 'path');
1281
1210
  return polygon;
1282
1211
  }
1283
1212
  setLocation(point) {
@@ -1758,11 +1687,7 @@
1758
1687
  for (let i = 0; i < data.length; i++) {
1759
1688
  const textData = data[i];
1760
1689
  const baseMark = this._idToGraphic.get(textData.id);
1761
- const labelAttribute = {
1762
- fill: baseMark.attribute.fill,
1763
- ...textStyle,
1764
- ...textData
1765
- };
1690
+ const labelAttribute = Object.assign(Object.assign({ fill: baseMark.attribute.fill }, textStyle), textData);
1766
1691
  const text = this._createLabelText(labelAttribute);
1767
1692
  const textBounds = this.getGraphicBounds(text);
1768
1693
  textBoundsArray.push(textBounds);
@@ -1920,7 +1845,7 @@
1920
1845
  const prevTextMap = this._graphicToText || new Map();
1921
1846
  const texts = [];
1922
1847
  labels.forEach((text, index) => {
1923
- var _a, _b, _c, _d, _e, _f, _g, _h;
1848
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1924
1849
  const labelLine = ((_a = text.attribute) === null || _a === void 0 ? void 0 : _a.labelLinePath)
1925
1850
  ? vrender.createPath({
1926
1851
  visible: (_c = (_b = text.attribute) === null || _b === void 0 ? void 0 : _b.visible) !== null && _c !== void 0 ? _c : true,
@@ -1933,7 +1858,7 @@
1933
1858
  const state = (prevTextMap === null || prevTextMap === void 0 ? void 0 : prevTextMap.get(relatedGraphic)) ? 'update' : 'enter';
1934
1859
  if (state === 'enter') {
1935
1860
  texts.push(text);
1936
- currentTextMap.set(relatedGraphic, text);
1861
+ currentTextMap.set(relatedGraphic, labelLine ? { text, labelLine } : { text });
1937
1862
  if (!disableAnimation && relatedGraphic) {
1938
1863
  const { from, to } = getAnimationAttributes(text.attribute, 'fadeIn');
1939
1864
  this.add(text);
@@ -1960,11 +1885,17 @@
1960
1885
  }
1961
1886
  }
1962
1887
  if (state === 'update') {
1963
- const prevText = prevTextMap.get(relatedGraphic);
1888
+ const prevLabel = prevTextMap.get(relatedGraphic);
1964
1889
  prevTextMap.delete(relatedGraphic);
1965
- currentTextMap.set(relatedGraphic, prevText);
1890
+ currentTextMap.set(relatedGraphic, prevLabel);
1966
1891
  if (!disableAnimation) {
1892
+ const prevText = prevLabel.text;
1967
1893
  prevText.animate().to(text.attribute, duration, easing);
1894
+ if (prevLabel.labelLine) {
1895
+ prevLabel.labelLine
1896
+ .animate()
1897
+ .to(vutils.merge({}, prevLabel.labelLine.attribute, { path: (_j = text.attribute) === null || _j === void 0 ? void 0 : _j.labelLinePath }), duration, easing);
1898
+ }
1968
1899
  if (animationConfig.increaseEffect !== false &&
1969
1900
  prevText.attribute.text !== text.attribute.text &&
1970
1901
  vutils.isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))) {
@@ -1974,17 +1905,27 @@
1974
1905
  }
1975
1906
  }
1976
1907
  else {
1977
- prevText.setAttributes(text.attribute);
1908
+ prevLabel.text.setAttributes(text.attribute);
1909
+ if (prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.labelLine) {
1910
+ prevLabel.labelLine.setAttributes({ path: (_k = text.attribute) === null || _k === void 0 ? void 0 : _k.labelLinePath });
1911
+ }
1978
1912
  }
1979
1913
  }
1980
1914
  });
1981
1915
  prevTextMap.forEach(label => {
1916
+ var _a;
1982
1917
  if (disableAnimation) {
1983
- this.removeChild(label);
1918
+ this.removeChild(label.text);
1919
+ if (label === null || label === void 0 ? void 0 : label.labelLine) {
1920
+ this.removeChild(label.labelLine);
1921
+ }
1984
1922
  }
1985
1923
  else {
1986
- label === null || label === void 0 ? void 0 : label.animate().to(getAnimationAttributes(label.attribute, 'fadeOut').to, duration, easing).onEnd(() => {
1987
- this.removeChild(label);
1924
+ (_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, duration, easing).onEnd(() => {
1925
+ this.removeChild(label.text);
1926
+ if (label === null || label === void 0 ? void 0 : label.labelLine) {
1927
+ this.removeChild(label.labelLine);
1928
+ }
1988
1929
  });
1989
1930
  }
1990
1931
  });
@@ -3210,11 +3151,7 @@
3210
3151
  const { center } = this.attribute;
3211
3152
  path = getArcPath(center, points, false, !!closed);
3212
3153
  }
3213
- const shape = vrender.createPath({
3214
- path,
3215
- z: depth,
3216
- ...(vutils.isFunction(style) ? vutils.merge({}, Grid.defaultAttributes.style, style(item, index)) : style)
3217
- });
3154
+ const shape = vrender.createPath(Object.assign({ path, z: depth }, (vutils.isFunction(style) ? vutils.merge({}, Grid.defaultAttributes.style, style(item, index)) : style)));
3218
3155
  shape.name = `${this.name}-line`;
3219
3156
  shape.id = this._getNodeId(`path-${id}`);
3220
3157
  this.add(shape);
@@ -3231,14 +3168,7 @@
3231
3168
  const path = getLinePath(nextPoints, !!closed);
3232
3169
  const deltaX = vutils.abs(nextPoints[0].x - nextPoints[1].x);
3233
3170
  const deltaY = vutils.abs(nextPoints[0].y - nextPoints[1].y);
3234
- const shape = vrender.createPath({
3235
- path,
3236
- z: 0,
3237
- alpha: deltaX > deltaY ? ((points[1].x - points[0].x > 0 ? -1 : 1) * vutils.pi) / 2 : 0,
3238
- beta: deltaX < deltaY ? -vutils.pi / 2 : 0,
3239
- anchor3d: deltaX > deltaY ? [nextPoints[0].x, 0] : [0, nextPoints[0].y],
3240
- ...(vutils.isFunction(style) ? vutils.merge({}, Grid.defaultAttributes.style, style(item, index)) : style)
3241
- });
3171
+ const shape = vrender.createPath(Object.assign({ path, z: 0, alpha: deltaX > deltaY ? ((points[1].x - points[0].x > 0 ? -1 : 1) * vutils.pi) / 2 : 0, beta: deltaX < deltaY ? -vutils.pi / 2 : 0, anchor3d: deltaX > deltaY ? [nextPoints[0].x, 0] : [0, nextPoints[0].y] }, (vutils.isFunction(style) ? vutils.merge({}, Grid.defaultAttributes.style, style(item, index)) : style)));
3242
3172
  shape.name = `${this.name}-line`;
3243
3173
  shape.id = this._getNodeId(`path-${id}`);
3244
3174
  this.add(shape);
@@ -3322,11 +3252,7 @@
3322
3252
  };
3323
3253
  pointsAfterClip = [...pointsAfterClip.slice(0, pointsAfterClip.length - 1), pointsEnd];
3324
3254
  }
3325
- const line = vrender.createLine({
3326
- points: pointsAfterClip,
3327
- fill: false,
3328
- ...lineStyle
3329
- });
3255
+ const line = vrender.createLine(Object.assign({ points: pointsAfterClip, fill: false }, lineStyle));
3330
3256
  line.name = 'line';
3331
3257
  line.id = this._getNodeId('line');
3332
3258
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.line)) {
@@ -3361,14 +3287,7 @@
3361
3287
  };
3362
3288
  rotate = endAngle + Math.PI / 2;
3363
3289
  }
3364
- symbol = vrender.createSymbol({
3365
- ...position,
3366
- symbolType: symbolType,
3367
- size,
3368
- angle: autoRotate ? rotate + refAngle : 0,
3369
- strokeBoundsBuffer: 0,
3370
- ...style
3371
- });
3290
+ symbol = vrender.createSymbol(Object.assign(Object.assign(Object.assign({}, position), { symbolType: symbolType, size, angle: autoRotate ? rotate + refAngle : 0, strokeBoundsBuffer: 0 }), style));
3372
3291
  symbol.name = `${dim}-symbol`;
3373
3292
  symbol.id = this._getNodeId(`${dim}-symbol`);
3374
3293
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.symbol)) {
@@ -3660,9 +3579,7 @@
3660
3579
  container.add(tickLineGroup);
3661
3580
  tickLineItems.forEach((item, index) => {
3662
3581
  var _a;
3663
- const line = vrender.createLine({
3664
- ...this._getTickLineAttribute('tick', item, index, tickLineItems)
3665
- });
3582
+ const line = vrender.createLine(Object.assign({}, this._getTickLineAttribute('tick', item, index, tickLineItems)));
3666
3583
  line.name = exports.AXIS_ELEMENT_NAME.tick;
3667
3584
  line.id = this._getNodeId(item.id);
3668
3585
  if (vutils.isEmpty((_a = this.attribute.tick) === null || _a === void 0 ? void 0 : _a.state)) {
@@ -3686,9 +3603,7 @@
3686
3603
  const subTickLineItems = this.getSubTickLineItems();
3687
3604
  if (subTickLineItems.length) {
3688
3605
  subTickLineItems.forEach((item, index) => {
3689
- const line = vrender.createLine({
3690
- ...this._getTickLineAttribute('subTick', item, index, tickLineItems)
3691
- });
3606
+ const line = vrender.createLine(Object.assign({}, this._getTickLineAttribute('subTick', item, index, tickLineItems)));
3692
3607
  line.name = exports.AXIS_ELEMENT_NAME.subTick;
3693
3608
  line.id = this._getNodeId(`${index}`);
3694
3609
  if (vutils.isEmpty(subTick.state)) {
@@ -3762,9 +3677,7 @@
3762
3677
  }
3763
3678
  renderTitle(container) {
3764
3679
  const titleAttributes = this.getTitleAttribute();
3765
- const axisTitle = new Tag({
3766
- ...titleAttributes
3767
- });
3680
+ const axisTitle = new Tag(Object.assign({}, titleAttributes));
3768
3681
  axisTitle.name = exports.AXIS_ELEMENT_NAME.title;
3769
3682
  axisTitle.id = this._getNodeId('title');
3770
3683
  container.add(axisTitle);
@@ -3894,17 +3807,13 @@
3894
3807
  : style(tickItem.value, index, tickItem, tickItems))
3895
3808
  : style;
3896
3809
  const { start, end, anchor, alpha, beta } = tickItem;
3897
- return {
3898
- points: [start, end],
3899
- anchor,
3810
+ return Object.assign({ points: [start, end], anchor,
3900
3811
  alpha,
3901
- beta,
3902
- ...style
3903
- };
3812
+ beta }, style);
3904
3813
  }
3905
3814
  _getLabelAttribute(tickDatum, index, tickData, layer) {
3906
3815
  var _a, _b, _c, _d, _e, _f;
3907
- const { space = 4, inside = false, formatMethod, ...tagAttributes } = this.attribute.label;
3816
+ const _g = this.attribute.label, { space = 4, inside = false, formatMethod } = _g, tagAttributes = __rest(_g, ["space", "inside", "formatMethod"]);
3908
3817
  let offset = space;
3909
3818
  let tickLength = 0;
3910
3819
  if (((_a = this.attribute.tick) === null || _a === void 0 ? void 0 : _a.visible) && ((_b = this.attribute.tick) === null || _b === void 0 ? void 0 : _b.inside) === inside) {
@@ -3942,32 +3851,19 @@
3942
3851
  layer
3943
3852
  });
3944
3853
  }
3945
- return {
3946
- ...point,
3947
- text,
3948
- lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize,
3949
- ...textStyle
3950
- };
3854
+ return Object.assign(Object.assign(Object.assign({}, point), { text, lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }), textStyle);
3951
3855
  }
3952
3856
  _transformItems(items) {
3953
3857
  const data = [];
3954
3858
  items.forEach((item) => {
3955
3859
  var _a;
3956
- data.push({
3957
- ...item,
3958
- point: this.getTickCoord(item.value),
3959
- id: (_a = item.id) !== null && _a !== void 0 ? _a : item.label
3960
- });
3860
+ data.push(Object.assign(Object.assign({}, item), { point: this.getTickCoord(item.value), id: (_a = item.id) !== null && _a !== void 0 ? _a : item.label }));
3961
3861
  });
3962
3862
  return data;
3963
3863
  }
3964
3864
  _renderGridByType(type, container) {
3965
3865
  const gridAttrs = this.getGridAttribute(type);
3966
- const gridGroup = new Grid({
3967
- pickable: false,
3968
- ...gridAttrs,
3969
- zIndex: 0
3970
- });
3866
+ const gridGroup = new Grid(Object.assign(Object.assign({ pickable: false }, gridAttrs), { zIndex: 0 }));
3971
3867
  gridGroup.name = type === 'subGrid' ? `${exports.AXIS_ELEMENT_NAME.grid}-sub` : `${exports.AXIS_ELEMENT_NAME.grid}`;
3972
3868
  gridGroup.id = this._getNodeId(type);
3973
3869
  container.add(gridGroup);
@@ -4294,13 +4190,7 @@
4294
4190
  if (panel && panel.visible) {
4295
4191
  const axisContainer = this.axisContainer;
4296
4192
  const axisContainerBounds = axisContainer.AABBBounds;
4297
- const bgRect = vrender.createRect({
4298
- x: axisContainerBounds.x1,
4299
- y: axisContainerBounds.y1,
4300
- width: axisContainerBounds.width(),
4301
- height: axisContainerBounds.height(),
4302
- ...panel.style
4303
- });
4193
+ const bgRect = vrender.createRect(Object.assign({ x: axisContainerBounds.x1, y: axisContainerBounds.y1, width: axisContainerBounds.width(), height: axisContainerBounds.height() }, panel.style));
4304
4194
  bgRect.name = exports.AXIS_ELEMENT_NAME.background;
4305
4195
  bgRect.id = this._getNodeId('background');
4306
4196
  bgRect.states = vutils.merge({}, DEFAULT_STATES$1, (_a = panel.state) !== null && _a !== void 0 ? _a : {});
@@ -4309,14 +4199,9 @@
4309
4199
  }
4310
4200
  renderLine(container) {
4311
4201
  const { start, end, line } = this.attribute;
4312
- const { startSymbol, endSymbol, style, breakRange, breakShape, breakShapeStyle, state, ...restLineAttrs } = line;
4313
- const lineAttrs = {
4314
- points: [start, end],
4315
- startSymbol,
4316
- endSymbol,
4317
- lineStyle: style,
4318
- ...restLineAttrs
4319
- };
4202
+ const _a = line, { startSymbol, endSymbol, style, breakRange, breakShape, breakShapeStyle, state } = _a, restLineAttrs = __rest(_a, ["startSymbol", "endSymbol", "style", "breakRange", "breakShape", "breakShapeStyle", "state"]);
4203
+ const lineAttrs = Object.assign({ points: [start, end], startSymbol,
4204
+ endSymbol, lineStyle: style }, restLineAttrs);
4320
4205
  if (!vutils.isEmpty(state)) {
4321
4206
  lineAttrs.state = {
4322
4207
  line: vutils.merge({}, DEFAULT_STATES$1, state),
@@ -4352,7 +4237,7 @@
4352
4237
  }
4353
4238
  getTitleAttribute() {
4354
4239
  var _a, _b, _c, _d, _e, _f, _g, _h;
4355
- const { position = 'middle', space = 4, textStyle = {}, autoRotate = true, shape, background, state, ...restAttrs } = this.attribute.title;
4240
+ const _j = this.attribute.title, { position = 'middle', space = 4, textStyle = {}, autoRotate = true, shape, background, state } = _j, restAttrs = __rest(_j, ["position", "space", "textStyle", "autoRotate", "shape", "background", "state"]);
4356
4241
  let percent = 0.5;
4357
4242
  if (position === 'start') {
4358
4243
  percent = 0;
@@ -4464,35 +4349,21 @@
4464
4349
  textAlign = this.getTextAlign(vector);
4465
4350
  textBaseline = this.getTextBaseline(vector, false);
4466
4351
  }
4467
- const attrs = {
4468
- ...titlePoint,
4469
- ...restAttrs,
4470
- textStyle: {
4471
- textAlign,
4472
- textBaseline,
4473
- ...textStyle
4474
- },
4475
- state: {
4352
+ const attrs = Object.assign(Object.assign(Object.assign({}, titlePoint), restAttrs), { textStyle: Object.assign({ textAlign,
4353
+ textBaseline }, textStyle), state: {
4476
4354
  text: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.text),
4477
4355
  shape: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.shape),
4478
4356
  panel: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.background)
4479
- }
4480
- };
4357
+ } });
4481
4358
  attrs.angle = angle;
4482
4359
  if (shape && shape.visible) {
4483
- attrs.shape = {
4484
- visible: true,
4485
- ...shape.style
4486
- };
4360
+ attrs.shape = Object.assign({ visible: true }, shape.style);
4487
4361
  if (shape.space) {
4488
4362
  attrs.space = shape.space;
4489
4363
  }
4490
4364
  }
4491
4365
  if (background && background.visible) {
4492
- attrs.panel = {
4493
- visible: true,
4494
- ...background.style
4495
- };
4366
+ attrs.panel = Object.assign({ visible: true }, background.style);
4496
4367
  }
4497
4368
  return attrs;
4498
4369
  }
@@ -4588,10 +4459,7 @@
4588
4459
  items = subGridItems;
4589
4460
  }
4590
4461
  }
4591
- return {
4592
- ...gridAttribute,
4593
- items
4594
- };
4462
+ return Object.assign(Object.assign({}, gridAttribute), { items });
4595
4463
  }
4596
4464
  getTextBaseline(vector, inside) {
4597
4465
  let base = 'middle';
@@ -4744,14 +4612,8 @@
4744
4612
  arcRadius = innerRadius;
4745
4613
  arcInnerRadius = 0;
4746
4614
  }
4747
- const arcAttrs = {
4748
- ...center,
4749
- startAngle,
4750
- endAngle,
4751
- radius: arcRadius,
4752
- innerRadius: arcInnerRadius,
4753
- ...line === null || line === void 0 ? void 0 : line.style
4754
- };
4615
+ const arcAttrs = Object.assign(Object.assign(Object.assign({}, center), { startAngle,
4616
+ endAngle, radius: arcRadius, innerRadius: arcInnerRadius }), line === null || line === void 0 ? void 0 : line.style);
4755
4617
  const axisLine = vrender.createCircle(arcAttrs);
4756
4618
  axisLine.name = exports.AXIS_ELEMENT_NAME.line;
4757
4619
  axisLine.id = this._getNodeId('line');
@@ -4785,7 +4647,7 @@
4785
4647
  getTitleAttribute() {
4786
4648
  var _a, _b, _c, _d, _e, _f, _g, _h;
4787
4649
  const { center, radius, innerRadius = 0 } = this.attribute;
4788
- const { space = 4, textStyle = {}, shape, background, state, ...restAttrs } = this.attribute.title;
4650
+ const _j = this.attribute.title, { space = 4, textStyle = {}, shape, background, state } = _j, restAttrs = __rest(_j, ["space", "textStyle", "shape", "background", "state"]);
4789
4651
  let titlePoint = center;
4790
4652
  let labelHeight = 0;
4791
4653
  if (((_a = this.attribute.label) === null || _a === void 0 ? void 0 : _a.visible) && ((_b = this.attribute.label) === null || _b === void 0 ? void 0 : _b.inside) === false) {
@@ -4818,36 +4680,21 @@
4818
4680
  y: center.y + offset
4819
4681
  };
4820
4682
  }
4821
- const attrs = {
4822
- ...titlePoint,
4823
- ...restAttrs,
4824
- textStyle: {
4825
- textBaseline,
4826
- textAlign: 'center',
4827
- ...textStyle
4828
- },
4829
- state: {
4683
+ const attrs = Object.assign(Object.assign(Object.assign({}, titlePoint), restAttrs), { textStyle: Object.assign({ textBaseline, textAlign: 'center' }, textStyle), state: {
4830
4684
  text: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.text),
4831
4685
  shape: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.shape),
4832
4686
  panel: vutils.merge({}, DEFAULT_STATES$1, state === null || state === void 0 ? void 0 : state.background)
4833
- }
4834
- };
4687
+ } });
4835
4688
  const { angle } = restAttrs;
4836
4689
  attrs.angle = angle;
4837
4690
  if (shape && shape.visible) {
4838
- attrs.shape = {
4839
- visible: true,
4840
- ...shape.style
4841
- };
4691
+ attrs.shape = Object.assign({ visible: true }, shape.style);
4842
4692
  if (shape.space) {
4843
4693
  attrs.space = shape.space;
4844
4694
  }
4845
4695
  }
4846
4696
  if (background && background.visible) {
4847
- attrs.panel = {
4848
- visible: true,
4849
- ...background.style
4850
- };
4697
+ attrs.panel = Object.assign({ visible: true }, background.style);
4851
4698
  }
4852
4699
  return attrs;
4853
4700
  }
@@ -4964,11 +4811,8 @@
4964
4811
  items = subGridItems;
4965
4812
  }
4966
4813
  }
4967
- return {
4968
- ...gridAttribute,
4969
- items,
4970
- center
4971
- };
4814
+ return Object.assign(Object.assign({}, gridAttribute), { items,
4815
+ center });
4972
4816
  }
4973
4817
  getTextBaseline(vector) {
4974
4818
  let base = 'middle';
@@ -5027,12 +4871,7 @@
5027
4871
  this._newElementAttrMap[el.id] = {
5028
4872
  state: 'update',
5029
4873
  node: el,
5030
- attrs: {
5031
- ...newProps,
5032
- opacity: (_a = newProps.opacity) !== null && _a !== void 0 ? _a : 1,
5033
- fillOpacity: (_b = newProps.fillOpacity) !== null && _b !== void 0 ? _b : 1,
5034
- strokeOpacity: (_c = newProps.strokeOpacity) !== null && _c !== void 0 ? _c : 1
5035
- }
4874
+ attrs: Object.assign(Object.assign({}, newProps), { opacity: (_a = newProps.opacity) !== null && _a !== void 0 ? _a : 1, fillOpacity: (_b = newProps.fillOpacity) !== null && _b !== void 0 ? _b : 1, strokeOpacity: (_c = newProps.strokeOpacity) !== null && _c !== void 0 ? _c : 1 })
5036
4875
  };
5037
4876
  el.setAttributes(oldEl.attribute);
5038
4877
  }
@@ -5485,30 +5324,18 @@
5485
5324
  const { dragMaskStyle } = this.attribute;
5486
5325
  const { position, width, height } = this.getLayoutAttrFromConfig();
5487
5326
  if (this._isHorizontal) {
5488
- this._dragMask = this._container.createOrUpdateChild('dragMask', {
5489
- x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width),
5490
- y: position.y,
5491
- width: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
5492
- 0,
5493
- height,
5494
- ...dragMaskStyle
5495
- }, 'rect');
5327
+ this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width), y: position.y, width: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
5328
+ 0, height }, dragMaskStyle), 'rect');
5496
5329
  }
5497
5330
  else {
5498
- this._dragMask = this._container.createOrUpdateChild('dragMask', {
5499
- x: position.x,
5500
- y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height),
5501
- width,
5502
- height: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
5503
- 0,
5504
- ...dragMaskStyle
5505
- }, 'rect');
5331
+ this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: position.x, y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height), width, height: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
5332
+ 0 }, dragMaskStyle), 'rect');
5506
5333
  }
5507
5334
  }
5508
5335
  renderText() {
5509
5336
  const { startTextStyle, endTextStyle } = this.attribute;
5510
- const { formatMethod: startTextFormat, ...restStartStyle } = startTextStyle;
5511
- const { formatMethod: endTextFormat, ...restEndTextStyle } = endTextStyle;
5337
+ const { formatMethod: startTextFormat } = startTextStyle, restStartStyle = __rest(startTextStyle, ["formatMethod"]);
5338
+ const { formatMethod: endTextFormat } = endTextStyle, restEndTextStyle = __rest(endTextStyle, ["formatMethod"]);
5512
5339
  const { start, end } = this.state;
5513
5340
  this._startValue = this._statePointToData(start);
5514
5341
  this._endValue = this._statePointToData(end);
@@ -5633,127 +5460,37 @@
5633
5460
  const { position, width, height } = this.getLayoutAttrFromConfig();
5634
5461
  const group = this.createOrUpdateChild('dataZoom-container', {}, 'group');
5635
5462
  this._container = group;
5636
- this._background = group.createOrUpdateChild('background', {
5637
- x: position.x,
5638
- y: position.y,
5639
- width,
5640
- height,
5641
- cursor: brushSelect ? 'crosshair' : 'auto',
5642
- ...backgroundStyle
5643
- }, 'rect');
5463
+ this._background = group.createOrUpdateChild('background', Object.assign({ x: position.x, y: position.y, width,
5464
+ height, cursor: brushSelect ? 'crosshair' : 'auto' }, backgroundStyle), 'rect');
5644
5465
  ((_a = backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.line) === null || _a === void 0 ? void 0 : _a.visible) && this.setPreviewAttributes('line', group);
5645
5466
  ((_b = backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.area) === null || _b === void 0 ? void 0 : _b.visible) && this.setPreviewAttributes('area', group);
5646
5467
  brushSelect && this.renderDragMask();
5647
5468
  if (this._isHorizontal) {
5648
- this._selectedBackground = group.createOrUpdateChild('selectedBackground', {
5649
- x: position.x + start * width,
5650
- y: position.y,
5651
- width: (end - start) * width,
5652
- height: height,
5653
- cursor: brushSelect ? 'crosshair' : 'move',
5654
- ...selectedBackgroundStyle
5655
- }, 'rect');
5469
+ this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign({ x: position.x + start * width, y: position.y, width: (end - start) * width, height: height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), 'rect');
5656
5470
  }
5657
5471
  else {
5658
- this._selectedBackground = group.createOrUpdateChild('selectedBackground', {
5659
- x: position.x,
5660
- y: position.y + start * height,
5661
- width,
5662
- height: (end - start) * height,
5663
- cursor: brushSelect ? 'crosshair' : 'move',
5664
- ...selectedBackgroundStyle
5665
- }, 'rect');
5472
+ this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign({ x: position.x, y: position.y + start * height, width, height: (end - start) * height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), 'rect');
5666
5473
  }
5667
5474
  ((_c = selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.line) === null || _c === void 0 ? void 0 : _c.visible) && this.setSelectedPreviewAttributes('line', group);
5668
5475
  ((_d = selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.area) === null || _d === void 0 ? void 0 : _d.visible) && this.setSelectedPreviewAttributes('area', group);
5669
5476
  this.renderText();
5670
5477
  if (this._isHorizontal) {
5671
- this._startHandler = group.createOrUpdateChild('startHandler', {
5672
- x: position.x + start * width,
5673
- y: position.y + height / 2,
5674
- size: height,
5675
- angle: 0,
5676
- symbolType: (_e = startHandlerStyle === null || startHandlerStyle === void 0 ? void 0 : startHandlerStyle.symbolType) !== null && _e !== void 0 ? _e : 'square',
5677
- cursor: 'ew-resize',
5678
- strokeBoundsBuffer: 0,
5679
- boundsPadding: 2,
5680
- pickMode: 'imprecise',
5681
- ...startHandlerStyle
5682
- }, 'symbol');
5683
- this._endHandler = group.createOrUpdateChild('endHandler', {
5684
- x: position.x + end * width,
5685
- y: position.y + height / 2,
5686
- size: height,
5687
- angle: 0,
5688
- symbolType: (_f = endHandlerStyle === null || endHandlerStyle === void 0 ? void 0 : endHandlerStyle.symbolType) !== null && _f !== void 0 ? _f : 'square',
5689
- cursor: 'ew-resize',
5690
- strokeBoundsBuffer: 0,
5691
- boundsPadding: 2,
5692
- pickMode: 'imprecise',
5693
- ...endHandlerStyle
5694
- }, 'symbol');
5478
+ this._startHandler = group.createOrUpdateChild('startHandler', Object.assign({ x: position.x + start * width, y: position.y + height / 2, size: height, angle: 0, symbolType: (_e = startHandlerStyle === null || startHandlerStyle === void 0 ? void 0 : startHandlerStyle.symbolType) !== null && _e !== void 0 ? _e : 'square', cursor: 'ew-resize', strokeBoundsBuffer: 0, boundsPadding: 2, pickMode: 'imprecise' }, startHandlerStyle), 'symbol');
5479
+ this._endHandler = group.createOrUpdateChild('endHandler', Object.assign({ x: position.x + end * width, y: position.y + height / 2, size: height, angle: 0, symbolType: (_f = endHandlerStyle === null || endHandlerStyle === void 0 ? void 0 : endHandlerStyle.symbolType) !== null && _f !== void 0 ? _f : 'square', cursor: 'ew-resize', strokeBoundsBuffer: 0, boundsPadding: 2, pickMode: 'imprecise' }, endHandlerStyle), 'symbol');
5695
5480
  if (middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.visible) {
5696
- this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', {
5697
- x: position.x + start * width,
5698
- y: position.y - (((_g = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _g === void 0 ? void 0 : _g.size) || 10),
5699
- width: (end - start) * width,
5700
- height: ((_h = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _h === void 0 ? void 0 : _h.size) || 10,
5701
- ...(_j = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _j === void 0 ? void 0 : _j.style
5702
- }, 'rect');
5703
- this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', {
5704
- x: position.x + ((start + end) / 2) * width,
5705
- y: position.y - (((_k = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _k === void 0 ? void 0 : _k.size) || 10) / 2,
5706
- strokeBoundsBuffer: 0,
5707
- angle: 0,
5708
- symbolType: (_m = (_l = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon) === null || _l === void 0 ? void 0 : _l.symbolType) !== null && _m !== void 0 ? _m : 'square',
5709
- ...middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon
5710
- }, 'symbol');
5481
+ this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign({ x: position.x + start * width, y: position.y - (((_g = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _g === void 0 ? void 0 : _g.size) || 10), width: (end - start) * width, height: ((_h = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _h === void 0 ? void 0 : _h.size) || 10 }, (_j = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _j === void 0 ? void 0 : _j.style), 'rect');
5482
+ this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign({ x: position.x + ((start + end) / 2) * width, y: position.y - (((_k = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _k === void 0 ? void 0 : _k.size) || 10) / 2, strokeBoundsBuffer: 0, angle: 0, symbolType: (_m = (_l = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon) === null || _l === void 0 ? void 0 : _l.symbolType) !== null && _m !== void 0 ? _m : 'square' }, middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon), 'symbol');
5711
5483
  }
5712
5484
  }
5713
5485
  else {
5714
- this._startHandler = group.createOrUpdateChild('startHandler', {
5715
- x: position.x + width / 2,
5716
- y: position.y + start * height,
5717
- size: width,
5718
- angle: 90 * (Math.PI / 180),
5719
- symbolType: (_o = startHandlerStyle === null || startHandlerStyle === void 0 ? void 0 : startHandlerStyle.symbolType) !== null && _o !== void 0 ? _o : 'square',
5720
- cursor: 'ns-resize',
5721
- boundsPadding: 2,
5722
- pickMode: 'imprecise',
5723
- strokeBoundsBuffer: 0,
5724
- ...startHandlerStyle
5725
- }, 'symbol');
5486
+ this._startHandler = group.createOrUpdateChild('startHandler', Object.assign({ x: position.x + width / 2, y: position.y + start * height, size: width, angle: 90 * (Math.PI / 180), symbolType: (_o = startHandlerStyle === null || startHandlerStyle === void 0 ? void 0 : startHandlerStyle.symbolType) !== null && _o !== void 0 ? _o : 'square', cursor: 'ns-resize', boundsPadding: 2, pickMode: 'imprecise', strokeBoundsBuffer: 0 }, startHandlerStyle), 'symbol');
5726
5487
  if (middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.visible) {
5727
- this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', {
5728
- x: orient === 'left' ? position.x - (((_p = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _p === void 0 ? void 0 : _p.size) || 10) : position.x + width,
5729
- y: position.y + start * height,
5730
- width: ((_q = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _q === void 0 ? void 0 : _q.size) || 10,
5731
- height: (end - start) * height,
5732
- ...(_r = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _r === void 0 ? void 0 : _r.style
5733
- }, 'rect');
5734
- this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', {
5735
- x: orient === 'left'
5488
+ this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign({ x: orient === 'left' ? position.x - (((_p = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _p === void 0 ? void 0 : _p.size) || 10) : position.x + width, y: position.y + start * height, width: ((_q = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _q === void 0 ? void 0 : _q.size) || 10, height: (end - start) * height }, (_r = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _r === void 0 ? void 0 : _r.style), 'rect');
5489
+ this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign({ x: orient === 'left'
5736
5490
  ? position.x - (((_s = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _s === void 0 ? void 0 : _s.size) || 10) / 2
5737
- : position.x + width + (((_t = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _t === void 0 ? void 0 : _t.size) || 10) / 2,
5738
- y: position.y + ((start + end) / 2) * height,
5739
- angle: 90 * (Math.PI / 180),
5740
- symbolType: (_v = (_u = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon) === null || _u === void 0 ? void 0 : _u.symbolType) !== null && _v !== void 0 ? _v : 'square',
5741
- strokeBoundsBuffer: 0,
5742
- ...middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon
5743
- }, 'symbol');
5744
- }
5745
- this._endHandler = group.createOrUpdateChild('endHandler', {
5746
- x: position.x + width / 2,
5747
- y: position.y + end * height,
5748
- size: width,
5749
- angle: 90 * (Math.PI / 180),
5750
- symbolType: (_w = endHandlerStyle === null || endHandlerStyle === void 0 ? void 0 : endHandlerStyle.symbolType) !== null && _w !== void 0 ? _w : 'square',
5751
- cursor: 'ns-resize',
5752
- boundsPadding: 2,
5753
- pickMode: 'imprecise',
5754
- strokeBoundsBuffer: 0,
5755
- ...endHandlerStyle
5756
- }, 'symbol');
5491
+ : position.x + width + (((_t = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.background) === null || _t === void 0 ? void 0 : _t.size) || 10) / 2, y: position.y + ((start + end) / 2) * height, angle: 90 * (Math.PI / 180), symbolType: (_v = (_u = middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon) === null || _u === void 0 ? void 0 : _u.symbolType) !== null && _v !== void 0 ? _v : 'square', strokeBoundsBuffer: 0 }, middleHandlerStyle === null || middleHandlerStyle === void 0 ? void 0 : middleHandlerStyle.icon), 'symbol');
5492
+ }
5493
+ this._endHandler = group.createOrUpdateChild('endHandler', Object.assign({ x: position.x + width / 2, y: position.y + end * height, size: width, angle: 90 * (Math.PI / 180), symbolType: (_w = endHandlerStyle === null || endHandlerStyle === void 0 ? void 0 : endHandlerStyle.symbolType) !== null && _w !== void 0 ? _w : 'square', cursor: 'ns-resize', boundsPadding: 2, pickMode: 'imprecise', strokeBoundsBuffer: 0 }, endHandlerStyle), 'symbol');
5757
5494
  }
5758
5495
  }
5759
5496
  computeBasePoints() {
@@ -5848,19 +5585,9 @@
5848
5585
  }
5849
5586
  const { backgroundChartStyle } = this.attribute;
5850
5587
  type === 'line' &&
5851
- this._previewLine.setAttributes({
5852
- points: this.getPreviewLinePoints(),
5853
- curveType: 'basis',
5854
- pickable: false,
5855
- ...backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.line
5856
- });
5588
+ this._previewLine.setAttributes(Object.assign({ points: this.getPreviewLinePoints(), curveType: 'basis', pickable: false }, backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.line));
5857
5589
  type === 'area' &&
5858
- this._previewArea.setAttributes({
5859
- points: this.getPreviewAreaPoints(),
5860
- curveType: 'basis',
5861
- pickable: false,
5862
- ...backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.area
5863
- });
5590
+ this._previewArea.setAttributes(Object.assign({ points: this.getPreviewAreaPoints(), curveType: 'basis', pickable: false }, backgroundChartStyle === null || backgroundChartStyle === void 0 ? void 0 : backgroundChartStyle.area));
5864
5591
  }
5865
5592
  setSelectedPreviewAttributes(type, group) {
5866
5593
  if (!this._selectedPreviewGroupClip) {
@@ -5892,19 +5619,9 @@
5892
5619
  pickable: false
5893
5620
  });
5894
5621
  type === 'line' &&
5895
- this._selectedPreviewLine.setAttributes({
5896
- points: this.getPreviewLinePoints(),
5897
- curveType: 'basis',
5898
- pickable: false,
5899
- ...selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.line
5900
- });
5622
+ this._selectedPreviewLine.setAttributes(Object.assign({ points: this.getPreviewLinePoints(), curveType: 'basis', pickable: false }, selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.line));
5901
5623
  type === 'area' &&
5902
- this._selectedPreviewArea.setAttributes({
5903
- points: this.getPreviewAreaPoints(),
5904
- curveType: 'basis',
5905
- pickable: false,
5906
- ...selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.area
5907
- });
5624
+ this._selectedPreviewArea.setAttributes(Object.assign({ points: this.getPreviewAreaPoints(), curveType: 'basis', pickable: false }, selectedBackgroundChartStyle === null || selectedBackgroundChartStyle === void 0 ? void 0 : selectedBackgroundChartStyle.area));
5908
5625
  }
5909
5626
  maybeAddLabel(container, attributes, name) {
5910
5627
  let labelShape = this.find(node => node.name === name, true);
@@ -6288,10 +6005,7 @@
6288
6005
  }
6289
6006
  this._label.setAttributes({
6290
6007
  angle: label.autoRotate && labelAngle + ((_e = label === null || label === void 0 ? void 0 : label.refAngle) !== null && _e !== void 0 ? _e : 0),
6291
- textStyle: {
6292
- ...DEFAULT_MARK_LINE_TEXT_STYLE_MAP[labelPosition],
6293
- ...label.textStyle
6294
- }
6008
+ textStyle: Object.assign(Object.assign({}, DEFAULT_MARK_LINE_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
6295
6009
  });
6296
6010
  }
6297
6011
  initMarker(container) {
@@ -6305,9 +6019,7 @@
6305
6019
  line.name = 'mark-line-line';
6306
6020
  this._line = line;
6307
6021
  container.add(line);
6308
- const markLabel = new Tag({
6309
- ...label
6310
- });
6022
+ const markLabel = new Tag(Object.assign({}, label));
6311
6023
  markLabel.name = 'mark-line-label';
6312
6024
  this._label = markLabel;
6313
6025
  container.add(markLabel);
@@ -6322,9 +6034,7 @@
6322
6034
  endSymbol,
6323
6035
  lineStyle
6324
6036
  });
6325
- (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes({
6326
- ...label
6327
- });
6037
+ (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes(Object.assign({}, label));
6328
6038
  this.setLabelPos();
6329
6039
  }
6330
6040
  }
@@ -6369,49 +6079,31 @@
6369
6079
  const { label } = this.attribute;
6370
6080
  const labelPosition = (_a = label === null || label === void 0 ? void 0 : label.position) !== null && _a !== void 0 ? _a : 'middle';
6371
6081
  if (labelPosition.includes('left') || labelPosition.includes('Left')) {
6372
- (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes({
6373
- ...this.getLeftPos()
6374
- });
6082
+ (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes(Object.assign({}, this.getLeftPos()));
6375
6083
  }
6376
6084
  else if (labelPosition.includes('right') || labelPosition.includes('Right')) {
6377
- (_c = this._label) === null || _c === void 0 ? void 0 : _c.setAttributes({
6378
- ...this.getRightPos()
6379
- });
6085
+ (_c = this._label) === null || _c === void 0 ? void 0 : _c.setAttributes(Object.assign({}, this.getRightPos()));
6380
6086
  }
6381
6087
  else if (labelPosition.includes('top') || labelPosition.includes('Top')) {
6382
- (_d = this._label) === null || _d === void 0 ? void 0 : _d.setAttributes({
6383
- ...this.getTopPos()
6384
- });
6088
+ (_d = this._label) === null || _d === void 0 ? void 0 : _d.setAttributes(Object.assign({}, this.getTopPos()));
6385
6089
  }
6386
6090
  else if (labelPosition.includes('bottom') || labelPosition.includes('Bottom')) {
6387
- (_e = this._label) === null || _e === void 0 ? void 0 : _e.setAttributes({
6388
- ...this.getBottomPos()
6389
- });
6091
+ (_e = this._label) === null || _e === void 0 ? void 0 : _e.setAttributes(Object.assign({}, this.getBottomPos()));
6390
6092
  }
6391
6093
  else {
6392
- (_f = this._label) === null || _f === void 0 ? void 0 : _f.setAttributes({
6393
- ...this.getMiddlePos()
6394
- });
6094
+ (_f = this._label) === null || _f === void 0 ? void 0 : _f.setAttributes(Object.assign({}, this.getMiddlePos()));
6395
6095
  }
6396
6096
  (_g = this._label) === null || _g === void 0 ? void 0 : _g.setAttributes({
6397
- textStyle: {
6398
- ...DEFAULT_MARK_AREA_TEXT_STYLE_MAP[labelPosition],
6399
- ...label.textStyle
6400
- }
6097
+ textStyle: Object.assign(Object.assign({}, DEFAULT_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
6401
6098
  });
6402
6099
  }
6403
6100
  initMarker(container) {
6404
6101
  const { points, label, areaStyle } = this.attribute;
6405
- const area = vrender.createPolygon({
6406
- points: points,
6407
- ...areaStyle
6408
- });
6102
+ const area = vrender.createPolygon(Object.assign({ points: points }, areaStyle));
6409
6103
  area.name = 'mark-area-area';
6410
6104
  this._area = area;
6411
6105
  container.add(area);
6412
- const markLabel = new Tag({
6413
- ...label
6414
- });
6106
+ const markLabel = new Tag(Object.assign({}, label));
6415
6107
  markLabel.name = 'mark-area-label';
6416
6108
  this._label = markLabel;
6417
6109
  container.add(markLabel);
@@ -6420,13 +6112,8 @@
6420
6112
  updateMarker() {
6421
6113
  var _a, _b;
6422
6114
  const { points, label, areaStyle } = this.attribute;
6423
- (_a = this._area) === null || _a === void 0 ? void 0 : _a.setAttributes({
6424
- points: points,
6425
- ...areaStyle
6426
- });
6427
- (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes({
6428
- ...label
6429
- });
6115
+ (_a = this._area) === null || _a === void 0 ? void 0 : _a.setAttributes(Object.assign({ points: points }, areaStyle));
6116
+ (_b = this._label) === null || _b === void 0 ? void 0 : _b.setAttributes(Object.assign({}, label));
6430
6117
  this.setLabelPos();
6431
6118
  }
6432
6119
  }
@@ -6445,13 +6132,7 @@
6445
6132
  const itemOffsetX = refX * Math.cos(itemAngle) + refY * Math.cos(itemAngle - Math.PI / 2);
6446
6133
  const itemOffsetY = refX * Math.sin(itemAngle) + refY * Math.sin(itemAngle - Math.PI / 2);
6447
6134
  if (itemType === 'text') {
6448
- item === null || item === void 0 ? void 0 : item.setAttributes({
6449
- ...textStyle,
6450
- textStyle: {
6451
- ...DEFAULT_MARK_POINT_TEXT_STYLE_MAP[(itemContent === null || itemContent === void 0 ? void 0 : itemContent.position) || 'end'],
6452
- ...textStyle === null || textStyle === void 0 ? void 0 : textStyle.textStyle
6453
- }
6454
- });
6135
+ item === null || item === void 0 ? void 0 : item.setAttributes(Object.assign(Object.assign({}, textStyle), { textStyle: Object.assign(Object.assign({}, DEFAULT_MARK_POINT_TEXT_STYLE_MAP[(itemContent === null || itemContent === void 0 ? void 0 : itemContent.position) || 'end']), textStyle === null || textStyle === void 0 ? void 0 : textStyle.textStyle) }));
6455
6136
  }
6456
6137
  else if (itemType === 'richText') {
6457
6138
  item === null || item === void 0 ? void 0 : item.setAttributes({
@@ -6497,27 +6178,16 @@
6497
6178
  const { type = 'text', symbolStyle, richTextStyle, imageStyle, renderCustomCallback } = itemContent;
6498
6179
  let item;
6499
6180
  if (type === 'symbol') {
6500
- item = vrender.createSymbol({
6501
- ...itemPosition,
6502
- ...symbolStyle
6503
- });
6181
+ item = vrender.createSymbol(Object.assign(Object.assign({}, itemPosition), symbolStyle));
6504
6182
  }
6505
6183
  else if (type === 'text') {
6506
- item = new Tag({
6507
- ...itemPosition
6508
- });
6184
+ item = new Tag(Object.assign({}, itemPosition));
6509
6185
  }
6510
6186
  else if (type === 'richText') {
6511
- item = vrender.createRichText({
6512
- ...itemPosition,
6513
- ...richTextStyle
6514
- });
6187
+ item = vrender.createRichText(Object.assign(Object.assign({}, itemPosition), richTextStyle));
6515
6188
  }
6516
6189
  else if (type === 'image') {
6517
- item = vrender.createImage({
6518
- ...itemPosition,
6519
- ...imageStyle
6520
- });
6190
+ item = vrender.createImage(Object.assign(Object.assign({}, itemPosition), imageStyle));
6521
6191
  }
6522
6192
  else if (type === 'custom' && renderCustomCallback) {
6523
6193
  item = renderCustomCallback();
@@ -6594,8 +6264,7 @@
6594
6264
  var _a;
6595
6265
  const { lineStyle } = itemLine;
6596
6266
  const { startPointOffsetX, startPointOffsetY, endPointOffsetX, endPointOffsetY } = this.getDecorativeLineAttr(itemLine, itemPosition);
6597
- (_a = this._decorativeLine) === null || _a === void 0 ? void 0 : _a.setAttributes({
6598
- points: [
6267
+ (_a = this._decorativeLine) === null || _a === void 0 ? void 0 : _a.setAttributes(Object.assign(Object.assign({ points: [
6599
6268
  {
6600
6269
  x: itemPosition.x + startPointOffsetX,
6601
6270
  y: itemPosition.y + startPointOffsetY
@@ -6604,10 +6273,7 @@
6604
6273
  x: itemPosition.x + endPointOffsetX,
6605
6274
  y: itemPosition.y + endPointOffsetY
6606
6275
  }
6607
- ],
6608
- ...lineStyle,
6609
- visible
6610
- });
6276
+ ] }, lineStyle), { visible }));
6611
6277
  }
6612
6278
  initMarker(container) {
6613
6279
  var _a;
@@ -6754,46 +6420,18 @@
6754
6420
  if (!nextShape) {
6755
6421
  nextShape = isHorizontal ? 'triangleRight' : 'triangleDown';
6756
6422
  }
6757
- const preHandler = vrender.createSymbol({
6758
- strokeBoundsBuffer: 0,
6759
- pickMode: 'imprecise',
6760
- ...handlerStyle,
6761
- x: 0,
6762
- y: 0,
6763
- symbolType: preShape,
6764
- size: handlerSize
6765
- });
6423
+ const preHandler = vrender.createSymbol(Object.assign(Object.assign({ strokeBoundsBuffer: 0, pickMode: 'imprecise' }, handlerStyle), { x: 0, y: 0, symbolType: preShape, size: handlerSize }));
6766
6424
  preHandler.states = handlerState;
6767
6425
  preHandler.name = 'preHandler';
6768
6426
  this.preHandler = preHandler;
6769
6427
  container.add(preHandler);
6770
- const { width: maxTextWidth, height: maxTextHeight } = measureTextSize(`${total}/${total}`, {
6771
- textAlign: 'center',
6772
- textBaseline: 'middle',
6773
- ...textStyle
6774
- });
6428
+ const { width: maxTextWidth, height: maxTextHeight } = measureTextSize(`${total}/${total}`, Object.assign({ textAlign: 'center', textBaseline: 'middle' }, textStyle));
6775
6429
  const handlerSizeX = vutils.isNumber(handlerSize) ? handlerSize : handlerSize[0];
6776
6430
  const handlerSizeY = vutils.isNumber(handlerSize) ? handlerSize : handlerSize[1];
6777
- const text = vrender.createText({
6778
- x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
6779
- y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
6780
- text: `${defaultCurrent}/${total}`,
6781
- textAlign: 'center',
6782
- textBaseline: 'middle',
6783
- lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize,
6784
- ...textStyle
6785
- });
6431
+ const text = vrender.createText(Object.assign({ x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0, y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2, text: `${defaultCurrent}/${total}`, textAlign: 'center', textBaseline: 'middle', lineHeight: textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize }, textStyle));
6786
6432
  this.text = text;
6787
6433
  container.add(text);
6788
- const nextHandler = vrender.createSymbol({
6789
- strokeBoundsBuffer: 0,
6790
- pickMode: 'imprecise',
6791
- ...handlerStyle,
6792
- x: isHorizontal ? handlerSizeX + handlerSpace * 2 + maxTextWidth : 0,
6793
- y: isHorizontal ? 0 : handlerSizeY + handlerSpace * 2 + maxTextHeight,
6794
- symbolType: nextShape,
6795
- size: handlerSize
6796
- });
6434
+ const nextHandler = vrender.createSymbol(Object.assign(Object.assign({ strokeBoundsBuffer: 0, pickMode: 'imprecise' }, handlerStyle), { x: isHorizontal ? handlerSizeX + handlerSpace * 2 + maxTextWidth : 0, y: isHorizontal ? 0 : handlerSizeY + handlerSpace * 2 + maxTextHeight, symbolType: nextShape, size: handlerSize }));
6797
6435
  nextHandler.name = 'nextHandler';
6798
6436
  nextHandler.states = handlerState;
6799
6437
  this.nextHandler = nextHandler;
@@ -6920,19 +6558,13 @@
6920
6558
  maxWidth
6921
6559
  };
6922
6560
  if (shape && shape.visible) {
6923
- tagAttrs.shape = {
6924
- visible: true,
6925
- ...shape.style
6926
- };
6561
+ tagAttrs.shape = Object.assign({ visible: true }, shape.style);
6927
6562
  if (vutils.isValid(shape.space)) {
6928
6563
  tagAttrs.space = shape.space;
6929
6564
  }
6930
6565
  }
6931
6566
  if (background && background.visible) {
6932
- tagAttrs.panel = {
6933
- visible: true,
6934
- ...background.style
6935
- };
6567
+ tagAttrs.panel = Object.assign({ visible: true }, background.style);
6936
6568
  }
6937
6569
  const titleTag = new Tag(tagAttrs);
6938
6570
  titleTag.name = exports.LEGEND_ELEMENT_NAME.title;
@@ -7230,11 +6862,7 @@
7230
6862
  this._appendDataToShape(itemGroup, exports.LEGEND_ELEMENT_NAME.item, item, itemGroup);
7231
6863
  }
7232
6864
  else {
7233
- itemGroup = vrender.createGroup({
7234
- x: 0,
7235
- y: 0,
7236
- ...background === null || background === void 0 ? void 0 : background.style
7237
- });
6865
+ itemGroup = vrender.createGroup(Object.assign({ x: 0, y: 0 }, background === null || background === void 0 ? void 0 : background.style));
7238
6866
  this._appendDataToShape(itemGroup, exports.LEGEND_ELEMENT_NAME.item, item, itemGroup, background === null || background === void 0 ? void 0 : background.state);
7239
6867
  }
7240
6868
  itemGroup.addState(isSelected ? exports.LegendStateValue.selected : exports.LegendStateValue.unSelected);
@@ -7247,14 +6875,7 @@
7247
6875
  let focusStartX = 0;
7248
6876
  const shapeSize = vutils.get(shapeAttr, 'style.size', DEFAULT_SHAPE_SIZE);
7249
6877
  const shapeSpace = vutils.get(shapeAttr, 'space', DEFAULT_SHAPE_SPACE);
7250
- const itemShape = vrender.createSymbol({
7251
- x: 0,
7252
- y: 0,
7253
- symbolType: 'circle',
7254
- strokeBoundsBuffer: 0,
7255
- ...shape,
7256
- ...shapeAttr.style
7257
- });
6878
+ const itemShape = vrender.createSymbol(Object.assign(Object.assign({ x: 0, y: 0, symbolType: 'circle', strokeBoundsBuffer: 0 }, shape), shapeAttr.style));
7258
6879
  Object.keys(shapeAttr.state || {}).forEach(key => {
7259
6880
  const color = shapeAttr.state[key].fill ||
7260
6881
  shapeAttr.state[key].stroke;
@@ -7272,27 +6893,11 @@
7272
6893
  let focusSpace = 0;
7273
6894
  if (focus) {
7274
6895
  const focusSize = vutils.get(focusIconStyle, 'size', DEFAULT_SHAPE_SIZE);
7275
- focusShape = vrender.createSymbol({
7276
- x: 0,
7277
- y: -focusSize / 2 - 1,
7278
- strokeBoundsBuffer: 0,
7279
- ...focusIconStyle,
7280
- visible: false,
7281
- pickMode: 'imprecise',
7282
- boundsPadding: parsedPadding
7283
- });
6896
+ focusShape = vrender.createSymbol(Object.assign(Object.assign({ x: 0, y: -focusSize / 2 - 1, strokeBoundsBuffer: 0 }, focusIconStyle), { visible: false, pickMode: 'imprecise', boundsPadding: parsedPadding }));
7284
6897
  this._appendDataToShape(focusShape, exports.LEGEND_ELEMENT_NAME.focus, item, itemGroup);
7285
6898
  focusSpace = focusSize;
7286
6899
  }
7287
- const labelShape = vrender.createText({
7288
- x: shapeSize / 2 + shapeSpace,
7289
- y: 0,
7290
- textAlign: 'start',
7291
- textBaseline: 'middle',
7292
- lineHeight: (labelAttr === null || labelAttr === void 0 ? void 0 : labelAttr.style).fontSize,
7293
- ...labelAttr === null || labelAttr === void 0 ? void 0 : labelAttr.style,
7294
- text: labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label
7295
- });
6900
+ const labelShape = vrender.createText(Object.assign(Object.assign({ x: shapeSize / 2 + shapeSpace, y: 0, textAlign: 'start', textBaseline: 'middle', lineHeight: (labelAttr === null || labelAttr === void 0 ? void 0 : labelAttr.style).fontSize }, labelAttr === null || labelAttr === void 0 ? void 0 : labelAttr.style), { text: labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label }));
7296
6901
  this._appendDataToShape(labelShape, exports.LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelAttr === null || labelAttr === void 0 ? void 0 : labelAttr.state);
7297
6902
  labelShape.addState(isSelected ? exports.LegendStateValue.selected : exports.LegendStateValue.unSelected);
7298
6903
  innerGroup.add(labelShape);
@@ -7300,15 +6905,7 @@
7300
6905
  focusStartX += shapeSize / 2 + shapeSpace + labelShape.AABBBounds.width() + labelSpace;
7301
6906
  if (vutils.isValid(value)) {
7302
6907
  const valueSpace = vutils.get(valueAttr, 'space', focus ? DEFAULT_VALUE_SPACE : 0);
7303
- const valueShape = vrender.createText({
7304
- x: focusStartX + labelSpace,
7305
- y: 0,
7306
- textAlign: 'start',
7307
- textBaseline: 'middle',
7308
- lineHeight: (valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.style).fontSize,
7309
- ...valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.style,
7310
- text: valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value
7311
- });
6908
+ const valueShape = vrender.createText(Object.assign(Object.assign({ x: focusStartX + labelSpace, y: 0, textAlign: 'start', textBaseline: 'middle', lineHeight: (valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.style).fontSize }, valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.style), { text: valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value }));
7312
6909
  this._appendDataToShape(valueShape, exports.LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.state);
7313
6910
  valueShape.addState(isSelected ? exports.LegendStateValue.selected : exports.LegendStateValue.unSelected);
7314
6911
  if (this._itemWidthByUser) {
@@ -7355,7 +6952,7 @@
7355
6952
  const { maxWidth, maxHeight, maxCol = 1, maxRow = 2, item = {}, pager = {} } = this.attribute;
7356
6953
  const { spaceCol = DEFAULT_ITEM_SPACE_COL, spaceRow = DEFAULT_ITEM_SPACE_ROW } = item;
7357
6954
  const itemsContainer = this._itemsContainer;
7358
- const { animation = true, animationDuration = 450, animationEasing = 'quadIn', space: pagerSpace = DEFAULT_PAGER_SPACE, ...pageStyle } = pager;
6955
+ const { animation = true, animationDuration = 450, animationEasing = 'quadIn', space: pagerSpace = DEFAULT_PAGER_SPACE } = pager, pageStyle = __rest(pager, ["animation", "animationDuration", "animationEasing", "space"]);
7359
6956
  let pagerComp;
7360
6957
  let pageHeight = 0;
7361
6958
  let pageWidth = 0;
@@ -7363,16 +6960,12 @@
7363
6960
  let startY = 0;
7364
6961
  let pages = 1;
7365
6962
  if (isHorizontal) {
7366
- pagerComp = new Pager({
7367
- layout: maxRow === 1 ? 'horizontal' : 'vertical',
7368
- total: 99,
7369
- ...vutils.merge({
7370
- handler: {
7371
- preShape: 'triangleUp',
7372
- nextShape: 'triangleDown'
7373
- }
7374
- }, pageStyle)
7375
- });
6963
+ pagerComp = new Pager(Object.assign({ layout: maxRow === 1 ? 'horizontal' : 'vertical', total: 99 }, vutils.merge({
6964
+ handler: {
6965
+ preShape: 'triangleUp',
6966
+ nextShape: 'triangleDown'
6967
+ }
6968
+ }, pageStyle)));
7376
6969
  this._pager = pagerComp;
7377
6970
  this._innerView.add(pagerComp);
7378
6971
  pageHeight = (maxRow - 1) * spaceRow + this._itemHeight * maxRow;
@@ -7403,11 +6996,7 @@
7403
6996
  });
7404
6997
  }
7405
6998
  else {
7406
- pagerComp = new Pager({
7407
- layout: 'horizontal',
7408
- total: 99,
7409
- ...pageStyle
7410
- });
6999
+ pagerComp = new Pager(Object.assign({ layout: 'horizontal', total: 99 }, pageStyle));
7411
7000
  this._pager = pagerComp;
7412
7001
  this._innerView.add(pagerComp);
7413
7002
  pageWidth = this._itemMaxWidth * maxCol + (maxCol - 1) * spaceCol;
@@ -7883,15 +7472,7 @@
7883
7472
  let startLen = 0;
7884
7473
  let startTextShape;
7885
7474
  if (startText && startText.visible) {
7886
- startTextShape = vrender.createText({
7887
- x: isHorizontal ? 0 : railWidth / 2,
7888
- y: isHorizontal ? railHeight / 2 : 0,
7889
- textAlign: isHorizontal ? 'start' : 'center',
7890
- textBaseline: isHorizontal ? 'middle' : 'top',
7891
- text: startText.text,
7892
- lineHeight: (_a = startText.style) === null || _a === void 0 ? void 0 : _a.fontSize,
7893
- ...startText.style
7894
- });
7475
+ startTextShape = vrender.createText(Object.assign({ x: isHorizontal ? 0 : railWidth / 2, y: isHorizontal ? railHeight / 2 : 0, textAlign: isHorizontal ? 'start' : 'center', textBaseline: isHorizontal ? 'middle' : 'top', text: startText.text, lineHeight: (_a = startText.style) === null || _a === void 0 ? void 0 : _a.fontSize }, startText.style));
7895
7476
  startTextShape.name = exports.SLIDER_ELEMENT_NAME.startText;
7896
7477
  innerView.add(startTextShape);
7897
7478
  const space = vutils.isValid(startText.space) ? startText.space : 0;
@@ -7914,15 +7495,7 @@
7914
7495
  let endTextShape;
7915
7496
  if (endText && endText.visible) {
7916
7497
  const space = vutils.isValid(endText.space) ? endText.space : 0;
7917
- endTextShape = vrender.createText({
7918
- x: isHorizontal ? startLen + space : railWidth / 2,
7919
- y: isHorizontal ? railHeight / 2 : startLen + space,
7920
- textAlign: isHorizontal ? 'start' : 'center',
7921
- textBaseline: isHorizontal ? 'middle' : 'top',
7922
- text: endText.text,
7923
- lineHeight: (_b = endText.style) === null || _b === void 0 ? void 0 : _b.fontSize,
7924
- ...endText.style
7925
- });
7498
+ endTextShape = vrender.createText(Object.assign({ x: isHorizontal ? startLen + space : railWidth / 2, y: isHorizontal ? railHeight / 2 : startLen + space, textAlign: isHorizontal ? 'start' : 'center', textBaseline: isHorizontal ? 'middle' : 'top', text: endText.text, lineHeight: (_b = endText.style) === null || _b === void 0 ? void 0 : _b.fontSize }, endText.style));
7926
7499
  endTextShape.name = exports.SLIDER_ELEMENT_NAME.endText;
7927
7500
  innerView.add(endTextShape);
7928
7501
  }
@@ -7938,14 +7511,7 @@
7938
7511
  if (slidable !== false) {
7939
7512
  cursor = 'pointer';
7940
7513
  }
7941
- const railShape = vrender.createRect({
7942
- x: 0,
7943
- y: 0,
7944
- width: railWidth,
7945
- height: railHeight,
7946
- cursor,
7947
- ...railStyle
7948
- });
7514
+ const railShape = vrender.createRect(Object.assign({ x: 0, y: 0, width: railWidth, height: railHeight, cursor }, railStyle));
7949
7515
  railShape.name = exports.SLIDER_ELEMENT_NAME.rail;
7950
7516
  container.add(railShape);
7951
7517
  this._rail = railShape;
@@ -7962,14 +7528,7 @@
7962
7528
  const railLen = isHorizontal ? railWidth : railHeight;
7963
7529
  const [startValue, endValue] = convertValueToRange(value);
7964
7530
  const handlerStart = ((startValue - min) / (max - min)) * railLen;
7965
- const startHandler = this._renderHandler({
7966
- x: isHorizontal ? handlerStart : railWidth / 2,
7967
- y: isHorizontal ? railHeight / 2 : handlerStart,
7968
- size: handlerSize,
7969
- strokeBoundsBuffer: 0,
7970
- cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal),
7971
- ...handlerStyle
7972
- });
7531
+ const startHandler = this._renderHandler(Object.assign({ x: isHorizontal ? handlerStart : railWidth / 2, y: isHorizontal ? railHeight / 2 : handlerStart, size: handlerSize, strokeBoundsBuffer: 0, cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal) }, handlerStyle));
7973
7532
  startHandler.name = exports.SLIDER_ELEMENT_NAME.startHandler;
7974
7533
  this._startHandler = startHandler;
7975
7534
  container.add(startHandler);
@@ -7982,14 +7541,7 @@
7982
7541
  }
7983
7542
  if (range) {
7984
7543
  const handlerEnd = ((endValue - min) / (max - min)) * railLen;
7985
- const endHandler = this._renderHandler({
7986
- x: isHorizontal ? handlerEnd : railWidth / 2,
7987
- y: isHorizontal ? railHeight / 2 : handlerEnd,
7988
- size: handlerSize,
7989
- strokeBoundsBuffer: 0,
7990
- cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal),
7991
- ...handlerStyle
7992
- });
7544
+ const endHandler = this._renderHandler(Object.assign({ x: isHorizontal ? handlerEnd : railWidth / 2, y: isHorizontal ? railHeight / 2 : handlerEnd, size: handlerSize, strokeBoundsBuffer: 0, cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal) }, handlerStyle));
7993
7545
  endHandler.name = exports.SLIDER_ELEMENT_NAME.endHandler;
7994
7546
  this._endHandler = endHandler;
7995
7547
  container.add(endHandler);
@@ -8040,14 +7592,7 @@
8040
7592
  cursor = getDefaultCursor(isHorizontal);
8041
7593
  }
8042
7594
  const trackWidth = ((endValue - startValue) / (max - min)) * railLen;
8043
- const track = vrender.createRect({
8044
- x: isHorizontal ? ((startValue - min) / (max - min)) * railLen : 0,
8045
- y: isHorizontal ? 0 : ((startValue - min) / (max - min)) * railLen,
8046
- width: isHorizontal ? trackWidth : railWidth,
8047
- height: isHorizontal ? railHeight : trackWidth,
8048
- cursor,
8049
- ...trackStyle
8050
- });
7595
+ const track = vrender.createRect(Object.assign({ x: isHorizontal ? ((startValue - min) / (max - min)) * railLen : 0, y: isHorizontal ? 0 : ((startValue - min) / (max - min)) * railLen, width: isHorizontal ? trackWidth : railWidth, height: isHorizontal ? railHeight : trackWidth, cursor }, trackStyle));
8051
7596
  track.name = exports.SLIDER_ELEMENT_NAME.track;
8052
7597
  this._track = track;
8053
7598
  trackContainer.add(track);
@@ -8064,12 +7609,7 @@
8064
7609
  const railLen = isHorizontal ? railWidth : railHeight;
8065
7610
  const handlerStart = ((value - min) / (max - min)) * railLen;
8066
7611
  const textSpace = (_a = handlerText.space) !== null && _a !== void 0 ? _a : 4;
8067
- const textStyle = {
8068
- text: (handlerText === null || handlerText === void 0 ? void 0 : handlerText.formatter) ? handlerText.formatter(value) : value.toFixed((_b = handlerText === null || handlerText === void 0 ? void 0 : handlerText.precision) !== null && _b !== void 0 ? _b : 0),
8069
- lineHeight: (_c = handlerText.style) === null || _c === void 0 ? void 0 : _c.lineHeight,
8070
- cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal),
8071
- ...handlerText.style
8072
- };
7612
+ const textStyle = Object.assign({ text: (handlerText === null || handlerText === void 0 ? void 0 : handlerText.formatter) ? handlerText.formatter(value) : value.toFixed((_b = handlerText === null || handlerText === void 0 ? void 0 : handlerText.precision) !== null && _b !== void 0 ? _b : 0), lineHeight: (_c = handlerText.style) === null || _c === void 0 ? void 0 : _c.lineHeight, cursor: slidable === false ? 'default' : getDefaultCursor(isHorizontal) }, handlerText.style);
8073
7613
  if (isHorizontal) {
8074
7614
  if (align === 'top') {
8075
7615
  textStyle.textBaseline = 'bottom';
@@ -8337,10 +7877,7 @@
8337
7877
  handlerSize,
8338
7878
  handlerStyle,
8339
7879
  railStyle,
8340
- trackStyle: {
8341
- fill: this._color,
8342
- ...trackStyle
8343
- },
7880
+ trackStyle: Object.assign({ fill: this._color }, trackStyle),
8344
7881
  startText,
8345
7882
  endText,
8346
7883
  handlerText,
@@ -8419,10 +7956,7 @@
8419
7956
  offset: 1,
8420
7957
  color: endColor
8421
7958
  });
8422
- track.setAttribute('fill', {
8423
- ...this._color,
8424
- stops: newStops
8425
- });
7959
+ track.setAttribute('fill', Object.assign(Object.assign({}, this._color), { stops: newStops }));
8426
7960
  }
8427
7961
  }
8428
7962
  }
@@ -8530,10 +8064,7 @@
8530
8064
  railHeight,
8531
8065
  showHandler,
8532
8066
  handlerSize,
8533
- handlerStyle: {
8534
- symbolType: getSizeHandlerPath(align),
8535
- ...handlerStyle
8536
- },
8067
+ handlerStyle: Object.assign({ symbolType: getSizeHandlerPath(align) }, handlerStyle),
8537
8068
  railStyle,
8538
8069
  trackStyle,
8539
8070
  startText,
@@ -8565,13 +8096,7 @@
8565
8096
  slider.setAttribute('x', backgroundHeight);
8566
8097
  }
8567
8098
  }
8568
- const background = vrender.createPath({
8569
- x: 0,
8570
- y: start,
8571
- path,
8572
- ...sizeBackground,
8573
- zIndex: 0
8574
- });
8099
+ const background = vrender.createPath(Object.assign(Object.assign({ x: 0, y: start, path }, sizeBackground), { zIndex: 0 }));
8575
8100
  mainContainer.add(background);
8576
8101
  const titleSpace = this._title
8577
8102
  ? this._title.AABBBounds.height() + vutils.get(this.attribute, 'title.space', DEFAULT_TITLE_SPACE)
@@ -8633,16 +8158,7 @@
8633
8158
  this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
8634
8159
  }
8635
8160
  else if (vutils.isValid(text)) {
8636
- this._mainTitle = group.createOrUpdateChild('mainTitle', {
8637
- text: [text],
8638
- ...textStyle,
8639
- maxLineWidth: (_k = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _k !== void 0 ? _k : width,
8640
- heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit,
8641
- lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp,
8642
- ellipsis: (_l = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _l !== void 0 ? _l : true,
8643
- x: 0,
8644
- y: 0
8645
- }, 'wrapText');
8161
+ this._mainTitle = group.createOrUpdateChild('mainTitle', Object.assign(Object.assign({ text: [text] }, textStyle), { maxLineWidth: (_k = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _k !== void 0 ? _k : width, heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit, lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp, ellipsis: (_l = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _l !== void 0 ? _l : true, x: 0, y: 0 }), 'wrapText');
8646
8162
  }
8647
8163
  }
8648
8164
  const maintextHeight = this._mainTitle ? (_m = this._mainTitle) === null || _m === void 0 ? void 0 : _m.AABBBounds.height() : 0;
@@ -8663,16 +8179,7 @@
8663
8179
  this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
8664
8180
  }
8665
8181
  else if (vutils.isValid(subtext)) {
8666
- this._subTitle = group.createOrUpdateChild('subTitle', {
8667
- text: [subtext],
8668
- ...subtextStyle,
8669
- maxLineWidth: (_y = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _y !== void 0 ? _y : width,
8670
- heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit,
8671
- lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp,
8672
- ellipsis: (_z = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _z !== void 0 ? _z : true,
8673
- x: 0,
8674
- y: maintextHeight
8675
- }, 'wrapText');
8182
+ this._subTitle = group.createOrUpdateChild('subTitle', Object.assign(Object.assign({ text: [subtext] }, subtextStyle), { maxLineWidth: (_y = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _y !== void 0 ? _y : width, heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit, lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp, ellipsis: (_z = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _z !== void 0 ? _z : true, x: 0, y: maintextHeight }), 'wrapText');
8676
8183
  }
8677
8184
  }
8678
8185
  const subtextHeight = this._subTitle ? (_0 = this._subTitle) === null || _0 === void 0 ? void 0 : _0.AABBBounds.height() : 0;
@@ -8839,13 +8346,7 @@
8839
8346
  if (vutils.isValid(title)) {
8840
8347
  if (title.visible !== false) {
8841
8348
  const titleStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'title.style'), title.style);
8842
- this._title = group.createOrUpdateChild('indicator-title', {
8843
- ...titleStyle,
8844
- lineHeight: vutils.isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize,
8845
- visible: title.visible,
8846
- x: 0,
8847
- y: 0
8848
- }, 'text');
8349
+ this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({}, titleStyle), { lineHeight: vutils.isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize, visible: title.visible, x: 0, y: 0 }), 'text');
8849
8350
  if (title.autoFit && vutils.isValidNumber(limit)) {
8850
8351
  this._setAutoFit(limit, this._title, title);
8851
8352
  }
@@ -8868,13 +8369,7 @@
8868
8369
  contents.forEach((contentItem, i) => {
8869
8370
  if (contentItem.visible !== false) {
8870
8371
  const contentStyle = vutils.merge({}, vutils.get(DEFAULT_INDICATOR_THEME, 'content.style'), contentItem.style);
8871
- const contentComponent = group.createOrUpdateChild('indicator-content-' + i, {
8872
- ...contentStyle,
8873
- lineHeight: vutils.isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize,
8874
- visible: contentItem.visible,
8875
- x: 0,
8876
- y: titleHeight + titleSpace + lastContentHeight
8877
- }, 'text');
8372
+ const contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({}, contentStyle), { lineHeight: vutils.isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize, visible: contentItem.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'text');
8878
8373
  if (contentItem.autoFit && vutils.isValidNumber(limit)) {
8879
8374
  this._setAutoFit(limit, contentComponent, contentItem);
8880
8375
  }
@@ -9081,30 +8576,16 @@
9081
8576
  this._isPaused = true;
9082
8577
  this.updateAttributes = () => {
9083
8578
  this._startAttr = {
9084
- style: {
9085
- symbolType: iconPlay,
9086
- ...Controller.defaultControllerAttr,
9087
- ...this.attribute.start.style
9088
- }
8579
+ style: Object.assign(Object.assign({ symbolType: iconPlay }, Controller.defaultControllerAttr), this.attribute.start.style)
9089
8580
  };
9090
8581
  this._pauseAttr = {
9091
- style: {
9092
- symbolType: iconPause,
9093
- ...Controller.defaultControllerAttr,
9094
- ...this.attribute.pause.style
9095
- }
8582
+ style: Object.assign(Object.assign({ symbolType: iconPause }, Controller.defaultControllerAttr), this.attribute.pause.style)
9096
8583
  };
9097
8584
  this._forwardAttr = {
9098
- style: {
9099
- ...Controller.defaultControllerAttr,
9100
- ...this.attribute.forward.style
9101
- }
8585
+ style: Object.assign(Object.assign({}, Controller.defaultControllerAttr), this.attribute.forward.style)
9102
8586
  };
9103
8587
  this._backwardAttr = {
9104
- style: {
9105
- ...Controller.defaultControllerAttr,
9106
- ...this.attribute.backward.style
9107
- }
8588
+ style: Object.assign(Object.assign({}, Controller.defaultControllerAttr), this.attribute.backward.style)
9108
8589
  };
9109
8590
  this.updateLayout();
9110
8591
  };
@@ -9122,25 +8603,19 @@
9122
8603
  };
9123
8604
  this._initPlay = () => {
9124
8605
  if (vutils.isNil(this._playController)) {
9125
- this._playController = new PlayerIcon({
9126
- ...this._startAttr.style
9127
- });
8606
+ this._playController = new PlayerIcon(Object.assign({}, this._startAttr.style));
9128
8607
  this.add(this._playController);
9129
8608
  }
9130
8609
  };
9131
8610
  this._initBackward = () => {
9132
8611
  if (vutils.isNil(this._backwardController)) {
9133
- this._backwardController = new PlayerIcon({
9134
- ...this._backwardAttr.style
9135
- });
8612
+ this._backwardController = new PlayerIcon(Object.assign({}, this._backwardAttr.style));
9136
8613
  this.add(this._backwardController);
9137
8614
  }
9138
8615
  };
9139
8616
  this._initForward = () => {
9140
8617
  if (vutils.isNil(this._forwardController)) {
9141
- this._forwardController = new PlayerIcon({
9142
- ...this._forwardAttr.style
9143
- });
8618
+ this._forwardController = new PlayerIcon(Object.assign({}, this._forwardAttr.style));
9144
8619
  this.add(this._forwardController);
9145
8620
  }
9146
8621
  };
@@ -9171,16 +8646,10 @@
9171
8646
  };
9172
8647
  this.renderPlay = () => {
9173
8648
  if (this._isPaused) {
9174
- this._playController.setAttributes({
9175
- symbolType: this._playController.getComputedAttribute('symbolType'),
9176
- ...this._startAttr.style
9177
- });
8649
+ this._playController.setAttributes(Object.assign({ symbolType: this._playController.getComputedAttribute('symbolType') }, this._startAttr.style));
9178
8650
  }
9179
8651
  else {
9180
- this._playController.setAttributes({
9181
- symbolType: this._playController.getComputedAttribute('symbolType'),
9182
- ...this._pauseAttr.style
9183
- });
8652
+ this._playController.setAttributes(Object.assign({ symbolType: this._playController.getComputedAttribute('symbolType') }, this._pauseAttr.style));
9184
8653
  }
9185
8654
  };
9186
8655
  this.renderBackward = () => {
@@ -9379,63 +8848,31 @@
9379
8848
  if (isHorizontal(this._orient)) {
9380
8849
  attrs.layout = 'horizontal';
9381
8850
  attrs.start = {
9382
- style: {
9383
- ...attrs.start.style,
9384
- x: this._layoutInfo.start.x,
9385
- y: this._layoutInfo.start.y
9386
- }
8851
+ style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
9387
8852
  };
9388
8853
  attrs.pause = {
9389
- style: {
9390
- ...attrs.pause.style,
9391
- x: this._layoutInfo.start.x,
9392
- y: this._layoutInfo.start.y
9393
- }
8854
+ style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
9394
8855
  };
9395
8856
  attrs.backward = {
9396
- style: {
9397
- ...attrs.backward.style,
9398
- x: this._layoutInfo.backward.x,
9399
- y: this._layoutInfo.backward.y
9400
- }
8857
+ style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y })
9401
8858
  };
9402
8859
  attrs.forward = {
9403
- style: {
9404
- ...attrs.forward.style,
9405
- x: this._layoutInfo.forward.x,
9406
- y: this._layoutInfo.forward.y
9407
- }
8860
+ style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y })
9408
8861
  };
9409
8862
  }
9410
8863
  else {
9411
8864
  attrs.layout = 'vertical';
9412
8865
  attrs.start = {
9413
- style: {
9414
- ...attrs.start.style,
9415
- x: this._layoutInfo.start.x,
9416
- y: this._layoutInfo.start.y
9417
- }
8866
+ style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
9418
8867
  };
9419
8868
  attrs.pause = {
9420
- style: {
9421
- ...attrs.pause.style,
9422
- x: this._layoutInfo.start.x,
9423
- y: this._layoutInfo.start.y
9424
- }
8869
+ style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
9425
8870
  };
9426
8871
  attrs.backward = {
9427
- style: {
9428
- ...attrs.backward.style,
9429
- x: this._layoutInfo.backward.x,
9430
- y: this._layoutInfo.backward.y
9431
- }
8872
+ style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y })
9432
8873
  };
9433
8874
  attrs.forward = {
9434
- style: {
9435
- ...attrs.forward.style,
9436
- x: this._layoutInfo.forward.x,
9437
- y: this._layoutInfo.forward.y
9438
- }
8875
+ style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y })
9439
8876
  };
9440
8877
  }
9441
8878
  return attrs;
@@ -9457,13 +8894,13 @@
9457
8894
  this._data = this.attribute.data;
9458
8895
  this._minIndex = 0;
9459
8896
  this._maxIndex = this._data.length - 1;
9460
- this._railStyle = { ...(_b = (_a = this.attribute) === null || _a === void 0 ? void 0 : _a.slider) === null || _b === void 0 ? void 0 : _b.railStyle };
9461
- this._trackStyle = { ...(_d = (_c = this.attribute) === null || _c === void 0 ? void 0 : _c.slider) === null || _d === void 0 ? void 0 : _d.trackStyle };
9462
- this._handlerStyle = { ...(_f = (_e = this.attribute) === null || _e === void 0 ? void 0 : _e.slider) === null || _f === void 0 ? void 0 : _f.handlerStyle };
9463
- this._start = { ...(_h = (_g = this.attribute) === null || _g === void 0 ? void 0 : _g.controller) === null || _h === void 0 ? void 0 : _h.start };
9464
- this._pause = { ...(_k = (_j = this.attribute) === null || _j === void 0 ? void 0 : _j.controller) === null || _k === void 0 ? void 0 : _k.pause };
9465
- this._forward = { ...(_m = (_l = this.attribute) === null || _l === void 0 ? void 0 : _l.controller) === null || _m === void 0 ? void 0 : _m.forward };
9466
- this._backward = { ...(_p = (_o = this.attribute) === null || _o === void 0 ? void 0 : _o.controller) === null || _p === void 0 ? void 0 : _p.backward };
8897
+ this._railStyle = Object.assign({}, (_b = (_a = this.attribute) === null || _a === void 0 ? void 0 : _a.slider) === null || _b === void 0 ? void 0 : _b.railStyle);
8898
+ this._trackStyle = Object.assign({}, (_d = (_c = this.attribute) === null || _c === void 0 ? void 0 : _c.slider) === null || _d === void 0 ? void 0 : _d.trackStyle);
8899
+ this._handlerStyle = Object.assign({}, (_f = (_e = this.attribute) === null || _e === void 0 ? void 0 : _e.slider) === null || _f === void 0 ? void 0 : _f.handlerStyle);
8900
+ this._start = Object.assign({}, (_h = (_g = this.attribute) === null || _g === void 0 ? void 0 : _g.controller) === null || _h === void 0 ? void 0 : _h.start);
8901
+ this._pause = Object.assign({}, (_k = (_j = this.attribute) === null || _j === void 0 ? void 0 : _j.controller) === null || _k === void 0 ? void 0 : _k.pause);
8902
+ this._forward = Object.assign({}, (_m = (_l = this.attribute) === null || _l === void 0 ? void 0 : _l.controller) === null || _m === void 0 ? void 0 : _m.forward);
8903
+ this._backward = Object.assign({}, (_p = (_o = this.attribute) === null || _o === void 0 ? void 0 : _o.controller) === null || _p === void 0 ? void 0 : _p.backward);
9467
8904
  }
9468
8905
  _initLayoutInfo() {
9469
8906
  var _a, _b, _c;
@@ -9481,33 +8918,18 @@
9481
8918
  const startPx = startControllers.reduce((px, controller) => {
9482
8919
  const { key, space, style: { size } } = controller;
9483
8920
  const maxSize = vutils.isNumber(size) ? size : vutils.max(size[0], size[1]);
9484
- this._layoutInfo[key] = {
9485
- ...this._layoutInfo[key],
9486
- size: maxSize,
9487
- x: isHorizontal(this._orient) ? px + space : (this._size.width - maxSize) / 2,
9488
- y: isHorizontal(this._orient) ? (this._size.height - maxSize) / 2 : px + space
9489
- };
8921
+ this._layoutInfo[key] = Object.assign(Object.assign({}, this._layoutInfo[key]), { size: maxSize, x: isHorizontal(this._orient) ? px + space : (this._size.width - maxSize) / 2, y: isHorizontal(this._orient) ? (this._size.height - maxSize) / 2 : px + space });
9490
8922
  return px + space + maxSize;
9491
8923
  }, 0);
9492
- this._layoutInfo.slider = {
9493
- ...this._layoutInfo.slider,
9494
- size: railPx,
9495
- x: isHorizontal(this._orient)
8924
+ this._layoutInfo.slider = Object.assign(Object.assign({}, this._layoutInfo.slider), { size: railPx, x: isHorizontal(this._orient)
9496
8925
  ? startPx + this.attribute.slider.space
9497
- : (this._size.width - railSectionLength) / 2,
9498
- y: isHorizontal(this._orient)
8926
+ : (this._size.width - railSectionLength) / 2, y: isHorizontal(this._orient)
9499
8927
  ? (this._size.height - railSectionLength) / 2
9500
- : startPx + this.attribute.slider.space
9501
- };
8928
+ : startPx + this.attribute.slider.space });
9502
8929
  endControllers.reduce((px, controller) => {
9503
8930
  const { key, space, style: { size } } = controller;
9504
8931
  const maxSize = vutils.isNumber(size) ? size : vutils.max(size[0], size[1]);
9505
- this._layoutInfo[key] = {
9506
- ...this._layoutInfo[key],
9507
- size: maxSize,
9508
- x: isHorizontal(this._orient) ? px + space : (this._size.width - maxSize) / 2,
9509
- y: isHorizontal(this._orient) ? (this._size.height - maxSize) / 2 : px + space
9510
- };
8932
+ this._layoutInfo[key] = Object.assign(Object.assign({}, this._layoutInfo[key]), { size: maxSize, x: isHorizontal(this._orient) ? px + space : (this._size.width - maxSize) / 2, y: isHorizontal(this._orient) ? (this._size.height - maxSize) / 2 : px + space });
9511
8933
  return px + space + maxSize;
9512
8934
  }, startPx + sliderPx);
9513
8935
  }
@@ -9556,10 +8978,10 @@
9556
8978
  handlerStyle: {}
9557
8979
  },
9558
8980
  controller: {
9559
- start: { ...defaultControllerAttributes, key: 'start', position: 'start', space: 0 },
9560
- pause: { ...defaultControllerAttributes, key: 'pause', position: 'start' },
9561
- forward: { ...defaultControllerAttributes, key: 'forward', position: 'end' },
9562
- backward: { ...defaultControllerAttributes, key: 'backward', position: 'start' }
8981
+ start: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'start', position: 'start', space: 0 }),
8982
+ pause: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'pause', position: 'start' }),
8983
+ forward: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'forward', position: 'end' }),
8984
+ backward: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'backward', position: 'start' })
9563
8985
  }
9564
8986
  };
9565
8987
 
@@ -9776,7 +9198,7 @@
9776
9198
  }
9777
9199
  }
9778
9200
  };
9779
- this.play = async () => {
9201
+ this.play = () => __awaiter(this, void 0, void 0, function* () {
9780
9202
  if (this._isPlaying) {
9781
9203
  return;
9782
9204
  }
@@ -9788,7 +9210,7 @@
9788
9210
  this._startTime = Date.now() - this._elapsed;
9789
9211
  this.dispatchCustomEvent(exports.PlayerEventEnum.OnPlay);
9790
9212
  this._rafId = vrender.vglobal.getRequestAnimationFrame()(this._play.bind(this));
9791
- };
9213
+ });
9792
9214
  this._play = () => {
9793
9215
  this._elapsed = Date.now() - this._startTime;
9794
9216
  const value = this._getSliderValue();
@@ -10126,12 +9548,7 @@
10126
9548
  }
10127
9549
  _addBrushMask() {
10128
9550
  const { brushStyle } = this.attribute;
10129
- const brushMask = vrender.createPolygon({
10130
- points: vutils.cloneDeep(this._cacheDrawPoints),
10131
- cursor: 'move',
10132
- pickable: false,
10133
- ...brushStyle
10134
- });
9551
+ const brushMask = vrender.createPolygon(Object.assign({ points: vutils.cloneDeep(this._cacheDrawPoints), cursor: 'move', pickable: false }, brushStyle));
10135
9552
  brushMask.name = `brush-${Date.now()}`;
10136
9553
  this._operatingMask = brushMask;
10137
9554
  this._container.add(brushMask);
@@ -10184,10 +9601,7 @@
10184
9601
  textAlign: textAlign,
10185
9602
  textBaseline: textBaseline,
10186
9603
  singleLine: false,
10187
- textConfig: vutils.array(text).map(text => ({
10188
- ...attr,
10189
- text
10190
- }))
9604
+ textConfig: vutils.array(text).map(text => (Object.assign(Object.assign({}, attr), { text })))
10191
9605
  };
10192
9606
  };
10193
9607
 
@@ -10288,27 +9702,17 @@
10288
9702
  Tooltip.calculateTooltipPosition(this.attribute);
10289
9703
  }
10290
9704
  const padding = vutils.normalizePadding(this.attribute.padding);
10291
- this._tooltipPanel = this.createOrUpdateChild(TOOLTIP_BACKGROUND_NAME, {
10292
- visible: true,
10293
- ...panel
10294
- }, 'rect');
9705
+ this._tooltipPanel = this.createOrUpdateChild(TOOLTIP_BACKGROUND_NAME, Object.assign({ visible: true }, panel), 'rect');
10295
9706
  this._tooltipTitleContainer = this.createOrUpdateChild(TOOLTIP_TITLE_NAME, { visible: true, x: padding[3], y: padding[0] }, 'group');
10296
9707
  const titleAttr = Tooltip.getTitleAttr(this.attribute);
10297
9708
  this._tooltipTitleSymbol = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, vutils.merge({ symbolType: 'circle' }, titleAttr.shape, {
10298
9709
  visible: isVisible(titleAttr) && isVisible(titleAttr.shape)
10299
9710
  }), 'symbol');
10300
9711
  if (titleAttr.value.multiLine) {
10301
- this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, {
10302
- visible: isVisible(titleAttr) && isVisible(titleAttr.value),
10303
- ...getRichTextAttribute(titleAttr.value)
10304
- }, 'richtext');
9712
+ this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ visible: isVisible(titleAttr) && isVisible(titleAttr.value) }, getRichTextAttribute(titleAttr.value)), 'richtext');
10305
9713
  }
10306
9714
  else {
10307
- this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, {
10308
- text: '',
10309
- visible: isVisible(titleAttr) && isVisible(titleAttr.value),
10310
- ...titleAttr.value
10311
- }, 'text');
9715
+ this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ text: '', visible: isVisible(titleAttr) && isVisible(titleAttr.value) }, titleAttr.value), 'text');
10312
9716
  }
10313
9717
  const titlePaddingLeft = isVisible(titleAttr.shape) ? titleAttr.shape.size + titleAttr.shape.spacing : 0;
10314
9718
  const { textAlign, textBaseline } = titleAttr.value;
@@ -10348,13 +9752,8 @@
10348
9752
  const itemGroup = this._tooltipContent.createOrUpdateChild(itemGroupName, { visible: true, x: 0, y: lastYPos }, 'group');
10349
9753
  let x = 0;
10350
9754
  if (isVisible(itemAttr.shape)) {
10351
- itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, {
10352
- visible: true,
10353
- x: itemAttr.shape.size / 2,
10354
- y: itemAttr.shape.size / 2 +
10355
- (((_a = itemAttr.key.lineHeight) !== null && _a !== void 0 ? _a : itemAttr.key.fontSize) - itemAttr.shape.size) / 2,
10356
- ...itemAttr.shape
10357
- }, 'symbol');
9755
+ itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, Object.assign({ visible: true, x: itemAttr.shape.size / 2, y: itemAttr.shape.size / 2 +
9756
+ (((_a = itemAttr.key.lineHeight) !== null && _a !== void 0 ? _a : itemAttr.key.fontSize) - itemAttr.shape.size) / 2 }, itemAttr.shape), 'symbol');
10358
9757
  }
10359
9758
  if (hasContentShape) {
10360
9759
  x += itemAttr.shape.size + itemAttr.shape.spacing;
@@ -10362,18 +9761,10 @@
10362
9761
  if (isVisible(itemAttr.key)) {
10363
9762
  let element;
10364
9763
  if (itemAttr.key.multiLine) {
10365
- element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_KEY_NAME_SUFFIX}`, {
10366
- visible: true,
10367
- ...getRichTextAttribute(itemAttr.key),
10368
- textBaseline: 'top'
10369
- }, 'richtext');
9764
+ element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_KEY_NAME_SUFFIX}`, Object.assign(Object.assign({ visible: true }, getRichTextAttribute(itemAttr.key)), { textBaseline: 'top' }), 'richtext');
10370
9765
  }
10371
9766
  else {
10372
- element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_KEY_NAME_SUFFIX}`, {
10373
- visible: true,
10374
- ...itemAttr.key,
10375
- textBaseline: 'top'
10376
- }, 'text');
9767
+ element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_KEY_NAME_SUFFIX}`, Object.assign(Object.assign({ visible: true }, itemAttr.key), { textBaseline: 'top' }), 'text');
10377
9768
  }
10378
9769
  const { textAlign } = itemAttr.key;
10379
9770
  if (textAlign === 'center') {
@@ -10391,18 +9782,10 @@
10391
9782
  if (isVisible(itemAttr.value)) {
10392
9783
  let element;
10393
9784
  if (itemAttr.value.multiLine) {
10394
- element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_VALUE_NAME_SUFFIX}`, {
10395
- visible: true,
10396
- ...getRichTextAttribute(itemAttr.value),
10397
- textBaseline: 'top'
10398
- }, 'richtext');
9785
+ element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign(Object.assign({ visible: true }, getRichTextAttribute(itemAttr.value)), { textBaseline: 'top' }), 'richtext');
10399
9786
  }
10400
9787
  else {
10401
- element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_VALUE_NAME_SUFFIX}`, {
10402
- visible: true,
10403
- ...itemAttr.value,
10404
- textBaseline: 'top'
10405
- }, 'text');
9788
+ element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign(Object.assign({ visible: true }, itemAttr.value), { textBaseline: 'top' }), 'text');
10406
9789
  }
10407
9790
  let textAlign = 'right';
10408
9791
  if (vutils.isValid(itemAttr.value.textAlign)) {
@@ -10581,7 +9964,7 @@
10581
9964
  }
10582
9965
  Tooltip.defaultAttributes = defaultAttributes;
10583
9966
 
10584
- const version = "0.14.1";
9967
+ const version = "0.14.2";
10585
9968
 
10586
9969
  exports.AbstractComponent = AbstractComponent;
10587
9970
  exports.ArcInfo = ArcInfo;