@syncfusion/ej2-maps 19.4.53 → 19.4.55

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.
@@ -7829,20 +7829,23 @@ let Maps = class Maps extends Component {
7829
7829
  this.notify(click, targetEle);
7830
7830
  }
7831
7831
  if (!eventArgs.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
7832
- const layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
7833
- const shapeSelectedEventArgs = triggerShapeEvent(targetId, this.layers[layerIndex].selectionSettings, this, shapeSelected);
7834
- if (!shapeSelectedEventArgs.cancel && this.selectionModule && !isNullOrUndefined(this.shapeSelected)) {
7835
- customizeStyle(this.selectionModule.selectionType + 'selectionMap', this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
7836
- }
7837
- else if (shapeSelectedEventArgs.cancel && this.selectionModule
7838
- && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
7839
- removeClass(targetEle);
7840
- this.selectionModule.removedSelectionList(targetEle);
7841
- }
7832
+ this.triggerShapeSelection(targetEle);
7842
7833
  }
7843
7834
  });
7844
7835
  }
7845
7836
  }
7837
+ triggerShapeSelection(targetEle) {
7838
+ const layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
7839
+ const shapeSelectedEventArgs = triggerShapeEvent(targetEle.id, this.layers[layerIndex].selectionSettings, this, shapeSelected);
7840
+ if (!shapeSelectedEventArgs.cancel && this.selectionModule && !isNullOrUndefined(this.shapeSelected)) {
7841
+ customizeStyle(this.selectionModule.selectionType + 'selectionMap', this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
7842
+ }
7843
+ else if (shapeSelectedEventArgs.cancel && this.selectionModule
7844
+ && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
7845
+ removeClass(targetEle);
7846
+ this.selectionModule.removedSelectionList(targetEle);
7847
+ }
7848
+ }
7846
7849
  getClickLocation(targetId, pageX, pageY, targetElement, x, y) {
7847
7850
  let layerIndex = 0;
7848
7851
  let latLongValue;
@@ -7964,6 +7967,9 @@ let Maps = class Maps extends Component {
7964
7967
  const markerModule = this.markerModule;
7965
7968
  if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
7966
7969
  this.mergeCluster();
7970
+ if (element.id.indexOf('shapeIndex') > -1) {
7971
+ this.triggerShapeSelection(element);
7972
+ }
7967
7973
  }
7968
7974
  if (markerModule) {
7969
7975
  markerModule.markerClick(e);