@visactor/vchart 2.0.23-alpha.3 → 2.0.23-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +103 -69
  3. package/build/index.js +103 -69
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/component/index.js +1 -1
  7. package/cjs/component/legend/base-legend.js +1 -1
  8. package/cjs/component/legend/base-legend.js.map +1 -1
  9. package/cjs/component/util.js +2 -1
  10. package/cjs/constant/attribute.js +1 -2
  11. package/cjs/constant/scroll-bar.js +2 -1
  12. package/cjs/constant/waterfall.js +1 -2
  13. package/cjs/core/index.js +1 -1
  14. package/cjs/core/instance-manager.js +1 -1
  15. package/cjs/core/interface.js +1 -1
  16. package/cjs/core/util.js +1 -1
  17. package/cjs/core/vchart.js +2 -3
  18. package/cjs/core/vchart.js.map +1 -1
  19. package/cjs/data/initialize.js +1 -1
  20. package/cjs/data/register.js +1 -1
  21. package/cjs/series/map/map.js +6 -18
  22. package/cjs/series/map/map.js.map +1 -1
  23. package/cjs/series/scatter/scatter.d.ts +6 -0
  24. package/cjs/series/scatter/scatter.js +58 -20
  25. package/cjs/series/scatter/scatter.js.map +1 -1
  26. package/esm/component/index.js +1 -1
  27. package/esm/component/legend/base-legend.js +1 -1
  28. package/esm/component/legend/base-legend.js.map +1 -1
  29. package/esm/component/util.js +2 -1
  30. package/esm/constant/attribute.js +1 -2
  31. package/esm/constant/scroll-bar.js +2 -1
  32. package/esm/constant/waterfall.js +1 -2
  33. package/esm/core/index.js +1 -1
  34. package/esm/core/instance-manager.js +1 -1
  35. package/esm/core/interface.js +1 -1
  36. package/esm/core/util.js +1 -1
  37. package/esm/core/vchart.js +2 -3
  38. package/esm/core/vchart.js.map +1 -1
  39. package/esm/data/initialize.js +1 -1
  40. package/esm/data/register.js +1 -1
  41. package/esm/series/map/map.js +6 -18
  42. package/esm/series/map/map.js.map +1 -1
  43. package/esm/series/scatter/scatter.d.ts +6 -0
  44. package/esm/series/scatter/scatter.js +61 -19
  45. package/esm/series/scatter/scatter.js.map +1 -1
  46. package/package.json +4 -4
package/build/index.es.js CHANGED
@@ -61784,10 +61784,13 @@ class VChart {
61784
61784
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
61785
61785
  }
61786
61786
  reLayout() {
61787
- var _a, _b, _c;
61788
- (_a = this._chart) === null || _a === void 0 ? void 0 : _a.resetLayoutItemTag();
61789
- (_b = this._chart) === null || _b === void 0 ? void 0 : _b.setLayoutTag(true, null, false);
61790
- (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.render();
61787
+ if (!this._chart || !this._compiler || this._isReleased) {
61788
+ return;
61789
+ }
61790
+ this._chart.resetLayoutItemTag();
61791
+ this._chart.setLayoutTag(true, null, false);
61792
+ this._compiler.render();
61793
+ this._chart.onEvaluateEnd();
61791
61794
  }
61792
61795
  getCompiler() {
61793
61796
  return this._compiler;
@@ -74004,6 +74007,10 @@ class ScatterSeries extends CartesianSeries {
74004
74007
  if (this._symbolMark.getProduct()) {
74005
74008
  this._symbolMark.compileEncode();
74006
74009
  }
74010
+ if (this._isGeoCoordinateSeries()) {
74011
+ this._updateSymbolGraphicPosition();
74012
+ this._refreshLabelComponent(true, true);
74013
+ }
74007
74014
  }
74008
74015
  initLabelMarkStyle(labelMark) {
74009
74016
  if (!labelMark) {
@@ -74023,45 +74030,99 @@ class ScatterSeries extends CartesianSeries {
74023
74030
  }, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
74024
74031
  }
74025
74032
  }
74026
- handleZoom(e) {
74027
- var _a, _b, _c, _d;
74028
- this.getMarksWithoutRoot().forEach(mark => {
74029
- if (!mark) {
74030
- return;
74031
- }
74032
- const graphics = mark.getGraphics();
74033
- if (!graphics || !graphics.length) {
74034
- return;
74033
+ _updateSymbolGraphicPosition() {
74034
+ var _a;
74035
+ const graphics = (_a = this._symbolMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
74036
+ if (!graphics || !graphics.length) {
74037
+ return;
74038
+ }
74039
+ graphics.forEach((graphicItem) => {
74040
+ var _a, _b;
74041
+ const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
74042
+ const newPosition = this.dataToPosition(datum);
74043
+ if (newPosition && graphicItem) {
74044
+ graphicItem.setAttributes({
74045
+ x: newPosition.x,
74046
+ y: newPosition.y
74047
+ });
74035
74048
  }
74036
- graphics.forEach((graphicItem, i) => {
74037
- var _a, _b;
74038
- const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
74039
- const newPosition = this.dataToPosition(datum);
74040
- if (newPosition && graphicItem) {
74041
- graphicItem.translateTo(newPosition.x, newPosition.y);
74042
- }
74043
- });
74044
74049
  });
74045
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74046
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
74047
- labelComponent.renderInner();
74048
- }
74049
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
74050
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
74051
- vgrammarLabel.evaluate(null, null);
74050
+ }
74051
+ _ensureLabelGraphicPostMatrix() {
74052
+ var _a, _b;
74053
+ const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
74054
+ if (labelGraphic && !labelGraphic.attribute.postMatrix) {
74055
+ labelGraphic.setAttributes({
74056
+ postMatrix: new Matrix()
74057
+ });
74052
74058
  }
74053
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
74054
- if (labelGroup && (e === null || e === void 0 ? void 0 : e.scale) && (e === null || e === void 0 ? void 0 : e.scaleCenter)) {
74055
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
74056
- labelGroup.setAttributes({
74059
+ return labelGraphic;
74060
+ }
74061
+ _isGeoCoordinateSeries() {
74062
+ var _a, _b;
74063
+ return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
74064
+ }
74065
+ _refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
74066
+ var _a, _b;
74067
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74068
+ const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
74069
+ if (resetPostMatrix) {
74070
+ if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
74071
+ labelGraphic.setAttributes({
74057
74072
  postMatrix: new Matrix()
74058
74073
  });
74059
74074
  }
74060
- labelGroup.scale(e.scale, e.scale, e.scaleCenter);
74075
+ }
74076
+ if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
74077
+ labelGraphic.disableAnimation();
74078
+ if (!this._enableLabelAnimationHook) {
74079
+ this._enableLabelAnimationHook = () => {
74080
+ var _a, _b, _c, _d;
74081
+ const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
74082
+ (_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
74083
+ this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
74084
+ this._enableLabelAnimationHook = undefined;
74085
+ };
74086
+ this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
74087
+ }
74088
+ }
74089
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
74090
+ vgrammarLabel.renderInner();
74091
+ }
74092
+ }
74093
+ handleZoom(e) {
74094
+ const { scale, scaleCenter } = e;
74095
+ if (scale === 1) {
74096
+ return;
74097
+ }
74098
+ this._updateSymbolGraphicPosition();
74099
+ const labelGraphic = this._ensureLabelGraphicPostMatrix();
74100
+ if (labelGraphic) {
74101
+ labelGraphic.scale(scale, scale, scaleCenter);
74061
74102
  }
74062
74103
  }
74063
74104
  handlePan(e) {
74064
- this.handleZoom(e);
74105
+ const { delta } = e;
74106
+ if ((delta === null || delta === void 0 ? void 0 : delta[0]) === 0 && (delta === null || delta === void 0 ? void 0 : delta[1]) === 0) {
74107
+ return;
74108
+ }
74109
+ this._updateSymbolGraphicPosition();
74110
+ const labelGraphic = this._ensureLabelGraphicPostMatrix();
74111
+ if (labelGraphic) {
74112
+ labelGraphic.translate(delta[0], delta[1]);
74113
+ }
74114
+ }
74115
+ onLayoutEnd() {
74116
+ var _a, _b;
74117
+ super.onLayoutEnd();
74118
+ this._updateSymbolGraphicPosition();
74119
+ const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
74120
+ if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
74121
+ labelGraphic.setAttributes({
74122
+ postMatrix: new Matrix()
74123
+ });
74124
+ }
74125
+ this._refreshLabelComponent();
74065
74126
  }
74066
74127
  getDefaultShapeType() {
74067
74128
  return 'circle';
@@ -75320,7 +75381,7 @@ class MapSeries extends GeoSeries {
75320
75381
  this._mapViewData = null;
75321
75382
  }
75322
75383
  handleZoom(e) {
75323
- var _a, _b, _c, _d;
75384
+ var _a;
75324
75385
  const { scale, scaleCenter } = e;
75325
75386
  if (scale === 1) {
75326
75387
  return;
@@ -75334,26 +75395,13 @@ class MapSeries extends GeoSeries {
75334
75395
  }
75335
75396
  pathGroup.scale(scale, scale, scaleCenter);
75336
75397
  }
75337
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75338
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75339
- labelComponent.renderInner();
75340
- }
75341
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75342
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75343
- vgrammarLabel.evaluate(null, null);
75344
- }
75345
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75346
- if (labelGroup && scale && scaleCenter) {
75347
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75348
- labelGroup.setAttributes({
75349
- postMatrix: new Matrix()
75350
- });
75351
- }
75352
- labelGroup.scale(scale, scale, scaleCenter);
75398
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75399
+ if (vgrammarLabel) {
75400
+ vgrammarLabel.renderInner();
75353
75401
  }
75354
75402
  }
75355
75403
  handlePan(e) {
75356
- var _a, _b, _c, _d;
75404
+ var _a;
75357
75405
  const { delta } = e;
75358
75406
  if (delta[0] === 0 && delta[1] === 0) {
75359
75407
  return;
@@ -75367,22 +75415,9 @@ class MapSeries extends GeoSeries {
75367
75415
  }
75368
75416
  pathGroup.translate(delta[0], delta[1]);
75369
75417
  }
75370
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75371
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75372
- labelComponent.renderInner();
75373
- }
75374
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75375
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75376
- vgrammarLabel.evaluate(null, null);
75377
- }
75378
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75379
- if (labelGroup && delta) {
75380
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75381
- labelGroup.setAttributes({
75382
- postMatrix: new Matrix()
75383
- });
75384
- }
75385
- labelGroup.translate(delta[0], delta[1]);
75418
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75419
+ if (vgrammarLabel) {
75420
+ vgrammarLabel.renderInner();
75386
75421
  }
75387
75422
  }
75388
75423
  getDatumCenter(datum) {
@@ -95603,7 +95638,6 @@ class BaseLegend extends BaseComponent {
95603
95638
  }
95604
95639
  clear() {
95605
95640
  super.clear();
95606
- this._legendComponent = null;
95607
95641
  this._cacheAttrs = null;
95608
95642
  this._preSelectedData = null;
95609
95643
  }
package/build/index.js CHANGED
@@ -61790,10 +61790,13 @@
61790
61790
  (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
61791
61791
  }
61792
61792
  reLayout() {
61793
- var _a, _b, _c;
61794
- (_a = this._chart) === null || _a === void 0 ? void 0 : _a.resetLayoutItemTag();
61795
- (_b = this._chart) === null || _b === void 0 ? void 0 : _b.setLayoutTag(true, null, false);
61796
- (_c = this._compiler) === null || _c === void 0 ? void 0 : _c.render();
61793
+ if (!this._chart || !this._compiler || this._isReleased) {
61794
+ return;
61795
+ }
61796
+ this._chart.resetLayoutItemTag();
61797
+ this._chart.setLayoutTag(true, null, false);
61798
+ this._compiler.render();
61799
+ this._chart.onEvaluateEnd();
61797
61800
  }
61798
61801
  getCompiler() {
61799
61802
  return this._compiler;
@@ -74010,6 +74013,10 @@
74010
74013
  if (this._symbolMark.getProduct()) {
74011
74014
  this._symbolMark.compileEncode();
74012
74015
  }
74016
+ if (this._isGeoCoordinateSeries()) {
74017
+ this._updateSymbolGraphicPosition();
74018
+ this._refreshLabelComponent(true, true);
74019
+ }
74013
74020
  }
74014
74021
  initLabelMarkStyle(labelMark) {
74015
74022
  if (!labelMark) {
@@ -74029,45 +74036,99 @@
74029
74036
  }, exports.STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
74030
74037
  }
74031
74038
  }
74032
- handleZoom(e) {
74033
- var _a, _b, _c, _d;
74034
- this.getMarksWithoutRoot().forEach(mark => {
74035
- if (!mark) {
74036
- return;
74037
- }
74038
- const graphics = mark.getGraphics();
74039
- if (!graphics || !graphics.length) {
74040
- return;
74039
+ _updateSymbolGraphicPosition() {
74040
+ var _a;
74041
+ const graphics = (_a = this._symbolMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
74042
+ if (!graphics || !graphics.length) {
74043
+ return;
74044
+ }
74045
+ graphics.forEach((graphicItem) => {
74046
+ var _a, _b;
74047
+ const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
74048
+ const newPosition = this.dataToPosition(datum);
74049
+ if (newPosition && graphicItem) {
74050
+ graphicItem.setAttributes({
74051
+ x: newPosition.x,
74052
+ y: newPosition.y
74053
+ });
74041
74054
  }
74042
- graphics.forEach((graphicItem, i) => {
74043
- var _a, _b;
74044
- const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
74045
- const newPosition = this.dataToPosition(datum);
74046
- if (newPosition && graphicItem) {
74047
- graphicItem.translateTo(newPosition.x, newPosition.y);
74048
- }
74049
- });
74050
74055
  });
74051
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74052
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
74053
- labelComponent.renderInner();
74054
- }
74055
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
74056
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
74057
- vgrammarLabel.evaluate(null, null);
74056
+ }
74057
+ _ensureLabelGraphicPostMatrix() {
74058
+ var _a, _b;
74059
+ const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
74060
+ if (labelGraphic && !labelGraphic.attribute.postMatrix) {
74061
+ labelGraphic.setAttributes({
74062
+ postMatrix: new Matrix()
74063
+ });
74058
74064
  }
74059
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
74060
- if (labelGroup && (e === null || e === void 0 ? void 0 : e.scale) && (e === null || e === void 0 ? void 0 : e.scaleCenter)) {
74061
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
74062
- labelGroup.setAttributes({
74065
+ return labelGraphic;
74066
+ }
74067
+ _isGeoCoordinateSeries() {
74068
+ var _a, _b;
74069
+ return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
74070
+ }
74071
+ _refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
74072
+ var _a, _b;
74073
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
74074
+ const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
74075
+ if (resetPostMatrix) {
74076
+ if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
74077
+ labelGraphic.setAttributes({
74063
74078
  postMatrix: new Matrix()
74064
74079
  });
74065
74080
  }
74066
- labelGroup.scale(e.scale, e.scale, e.scaleCenter);
74081
+ }
74082
+ if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
74083
+ labelGraphic.disableAnimation();
74084
+ if (!this._enableLabelAnimationHook) {
74085
+ this._enableLabelAnimationHook = () => {
74086
+ var _a, _b, _c, _d;
74087
+ const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
74088
+ (_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
74089
+ this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
74090
+ this._enableLabelAnimationHook = undefined;
74091
+ };
74092
+ this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
74093
+ }
74094
+ }
74095
+ if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
74096
+ vgrammarLabel.renderInner();
74097
+ }
74098
+ }
74099
+ handleZoom(e) {
74100
+ const { scale, scaleCenter } = e;
74101
+ if (scale === 1) {
74102
+ return;
74103
+ }
74104
+ this._updateSymbolGraphicPosition();
74105
+ const labelGraphic = this._ensureLabelGraphicPostMatrix();
74106
+ if (labelGraphic) {
74107
+ labelGraphic.scale(scale, scale, scaleCenter);
74067
74108
  }
74068
74109
  }
74069
74110
  handlePan(e) {
74070
- this.handleZoom(e);
74111
+ const { delta } = e;
74112
+ if ((delta === null || delta === void 0 ? void 0 : delta[0]) === 0 && (delta === null || delta === void 0 ? void 0 : delta[1]) === 0) {
74113
+ return;
74114
+ }
74115
+ this._updateSymbolGraphicPosition();
74116
+ const labelGraphic = this._ensureLabelGraphicPostMatrix();
74117
+ if (labelGraphic) {
74118
+ labelGraphic.translate(delta[0], delta[1]);
74119
+ }
74120
+ }
74121
+ onLayoutEnd() {
74122
+ var _a, _b;
74123
+ super.onLayoutEnd();
74124
+ this._updateSymbolGraphicPosition();
74125
+ const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
74126
+ if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
74127
+ labelGraphic.setAttributes({
74128
+ postMatrix: new Matrix()
74129
+ });
74130
+ }
74131
+ this._refreshLabelComponent();
74071
74132
  }
74072
74133
  getDefaultShapeType() {
74073
74134
  return 'circle';
@@ -75326,7 +75387,7 @@
75326
75387
  this._mapViewData = null;
75327
75388
  }
75328
75389
  handleZoom(e) {
75329
- var _a, _b, _c, _d;
75390
+ var _a;
75330
75391
  const { scale, scaleCenter } = e;
75331
75392
  if (scale === 1) {
75332
75393
  return;
@@ -75340,26 +75401,13 @@
75340
75401
  }
75341
75402
  pathGroup.scale(scale, scale, scaleCenter);
75342
75403
  }
75343
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75344
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75345
- labelComponent.renderInner();
75346
- }
75347
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75348
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75349
- vgrammarLabel.evaluate(null, null);
75350
- }
75351
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75352
- if (labelGroup && scale && scaleCenter) {
75353
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75354
- labelGroup.setAttributes({
75355
- postMatrix: new Matrix()
75356
- });
75357
- }
75358
- labelGroup.scale(scale, scale, scaleCenter);
75404
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75405
+ if (vgrammarLabel) {
75406
+ vgrammarLabel.renderInner();
75359
75407
  }
75360
75408
  }
75361
75409
  handlePan(e) {
75362
- var _a, _b, _c, _d;
75410
+ var _a;
75363
75411
  const { delta } = e;
75364
75412
  if (delta[0] === 0 && delta[1] === 0) {
75365
75413
  return;
@@ -75373,22 +75421,9 @@
75373
75421
  }
75374
75422
  pathGroup.translate(delta[0], delta[1]);
75375
75423
  }
75376
- const labelComponent = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75377
- if (labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.renderInner) {
75378
- labelComponent.renderInner();
75379
- }
75380
- const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
75381
- if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
75382
- vgrammarLabel.evaluate(null, null);
75383
- }
75384
- const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
75385
- if (labelGroup && delta) {
75386
- if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
75387
- labelGroup.setAttributes({
75388
- postMatrix: new Matrix()
75389
- });
75390
- }
75391
- labelGroup.translate(delta[0], delta[1]);
75424
+ const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
75425
+ if (vgrammarLabel) {
75426
+ vgrammarLabel.renderInner();
75392
75427
  }
75393
75428
  }
75394
75429
  getDatumCenter(datum) {
@@ -95609,7 +95644,6 @@
95609
95644
  }
95610
95645
  clear() {
95611
95646
  super.clear();
95612
- this._legendComponent = null;
95613
95647
  this._cacheAttrs = null;
95614
95648
  this._preSelectedData = null;
95615
95649
  }