@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.
@@ -8110,20 +8110,23 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8110
8110
  _this.notify(click, targetEle);
8111
8111
  }
8112
8112
  if (!eventArgs_1.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
8113
- var layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
8114
- var shapeSelectedEventArgs = triggerShapeEvent(targetId, _this.layers[layerIndex].selectionSettings, _this, shapeSelected);
8115
- if (!shapeSelectedEventArgs.cancel && _this.selectionModule && !isNullOrUndefined(_this.shapeSelected)) {
8116
- customizeStyle(_this.selectionModule.selectionType + 'selectionMap', _this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
8117
- }
8118
- else if (shapeSelectedEventArgs.cancel && _this.selectionModule
8119
- && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
8120
- removeClass(targetEle);
8121
- _this.selectionModule.removedSelectionList(targetEle);
8122
- }
8113
+ _this.triggerShapeSelection(targetEle);
8123
8114
  }
8124
8115
  });
8125
8116
  }
8126
8117
  };
8118
+ Maps.prototype.triggerShapeSelection = function (targetEle) {
8119
+ var layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
8120
+ var shapeSelectedEventArgs = triggerShapeEvent(targetEle.id, this.layers[layerIndex].selectionSettings, this, shapeSelected);
8121
+ if (!shapeSelectedEventArgs.cancel && this.selectionModule && !isNullOrUndefined(this.shapeSelected)) {
8122
+ customizeStyle(this.selectionModule.selectionType + 'selectionMap', this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
8123
+ }
8124
+ else if (shapeSelectedEventArgs.cancel && this.selectionModule
8125
+ && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
8126
+ removeClass(targetEle);
8127
+ this.selectionModule.removedSelectionList(targetEle);
8128
+ }
8129
+ };
8127
8130
  Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
8128
8131
  var layerIndex = 0;
8129
8132
  var latLongValue;
@@ -8245,6 +8248,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8245
8248
  var markerModule = this.markerModule;
8246
8249
  if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
8247
8250
  this.mergeCluster();
8251
+ if (element.id.indexOf('shapeIndex') > -1) {
8252
+ this.triggerShapeSelection(element);
8253
+ }
8248
8254
  }
8249
8255
  if (markerModule) {
8250
8256
  markerModule.markerClick(e);