@syncfusion/ej2-maps 21.1.37 → 21.1.38

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.
@@ -8550,7 +8550,7 @@ let Maps = class Maps extends Component {
8550
8550
  latLongValue.latitude = -latLongValue.latitude;
8551
8551
  }
8552
8552
  }
8553
- else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule) {
8553
+ else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule && !this.markerDragArgument) {
8554
8554
  const markerIndex = parseInt(targetId.split('_MarkerIndex_')[1].split('_')[0], 10);
8555
8555
  const dataIndex = parseInt(targetId.split('_dataIndex_')[1].split('_')[0], 10);
8556
8556
  if (!isNaN(markerIndex) && !isNaN(dataIndex)) {
@@ -8561,6 +8561,23 @@ let Maps = class Maps extends Component {
8561
8561
  latLongValue = { latitude: null, longitude: null };
8562
8562
  }
8563
8563
  }
8564
+ else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule && this.markerDragArgument) {
8565
+ const element = document.getElementById(this.element.id + '_LayerIndex_' + this.markerDragArgument.layerIndex);
8566
+ const elementRect = element.getBoundingClientRect();
8567
+ const location = new MapLocation(pageX > elementRect.left ? Math.abs(elementRect.left - pageX) : 0, pageY > elementRect.top ? Math.abs(elementRect.top - pageY) : 0);
8568
+ const minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
8569
+ const minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
8570
+ latLongValue = {
8571
+ latitude: Math.abs(this.baseMapBounds.latitude.max - (location.y / (this.mapLayerPanel.currentFactor * this.scale))),
8572
+ longitude: Math.abs((location.x / (this.mapLayerPanel.currentFactor * this.scale)) + this.baseMapBounds.longitude.min)
8573
+ };
8574
+ if (this.baseMapBounds.longitude.min < 0 && minLongitude > location.x) {
8575
+ latLongValue.longitude = -latLongValue.longitude;
8576
+ }
8577
+ if (this.baseMapBounds.latitude.min < 0 && minLatitude > location.y) {
8578
+ latLongValue.latitude = -latLongValue.latitude;
8579
+ }
8580
+ }
8564
8581
  else {
8565
8582
  latLongValue = { latitude: null, longitude: null };
8566
8583
  }
@@ -13344,7 +13361,7 @@ class Selection {
13344
13361
  this.selectionsettings = this.maps.layers[layerIndex].markerSettings[markerIndex].selectionSettings;
13345
13362
  this.selectionType = 'Marker';
13346
13363
  }
13347
- else {
13364
+ else if (targetElement.id.indexOf('NavigationIndex') > -1) {
13348
13365
  const index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
13349
13366
  shapeData = null;
13350
13367
  data = {
@@ -13354,7 +13371,7 @@ class Selection {
13354
13371
  this.selectionsettings = this.maps.layers[layerIndex].navigationLineSettings[index].selectionSettings;
13355
13372
  this.selectionType = 'navigationline';
13356
13373
  }
13357
- if (this.selectionsettings.enable) {
13374
+ if (!isNullOrUndefined(this.selectionsettings) && this.selectionsettings.enable) {
13358
13375
  this.selectElement(targetElement, layerIndex, data, shapeData);
13359
13376
  }
13360
13377
  }