@syncfusion/ej2-maps 27.1.50 → 27.2.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.
@@ -12335,13 +12335,13 @@ class Legend {
12335
12335
  && idIndex === i) {
12336
12336
  const layer = this.maps.layers[collection[i]['data'][0]['layerIndex']];
12337
12337
  let enable;
12338
- let module;
12338
+ let legendModule;
12339
12339
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12340
12340
  let data;
12341
12341
  if (!isNullOrUndefined(layer)) {
12342
12342
  enable = (value === 'selection') ? layer.selectionSettings.enable : layer.highlightSettings.enable;
12343
- module = void 0;
12344
- module = (value === 'selection') ? layer.selectionSettings : layer.highlightSettings;
12343
+ legendModule = void 0;
12344
+ legendModule = (value === 'selection') ? layer.selectionSettings : layer.highlightSettings;
12345
12345
  data = collection[i]['data'];
12346
12346
  }
12347
12347
  if (enable) {
@@ -12385,12 +12385,12 @@ class Legend {
12385
12385
  const shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
12386
12386
  const shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
12387
12387
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
12388
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12389
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12388
+ this.setColor(shapeElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : shapeOldColor, isNullOrUndefined(legendModule.opacity) ? shapeOldFillOpacity : legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12389
+ this.setColor(targetElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendHighlightColor, isNullOrUndefined(legendModule.opacity) ? shapeOldFillOpacity : legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12390
12390
  }
12391
12391
  else if (value === 'selection') {
12392
12392
  this.legendHighlightCollection = [];
12393
- this.maps.legendSelectionClass = module;
12393
+ this.maps.legendSelectionClass = legendModule;
12394
12394
  if (j === 0) {
12395
12395
  this.pushCollection(targetElement, this.maps.legendSelectionCollection, collection[i], layer.shapeSettings);
12396
12396
  if (multiSelectEnable) {
@@ -12410,8 +12410,8 @@ class Legend {
12410
12410
  const legendSelectionColor = this.maps.legendSelectionCollection[selectLength - 1]['legendOldFill'];
12411
12411
  this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeElement);
12412
12412
  this.maps.legendSelectionCollection[selectLength - 1]['shapeOldFillColor'] = this.shapePreviousColor;
12413
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
12414
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
12413
+ this.setColor(targetElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendSelectionColor, legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'selection');
12414
+ this.setColor(shapeElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendSelectionColor, legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'selection');
12415
12415
  if (this.maps.selectedElementId.indexOf(shapeElement.getAttribute('id')) === -1) {
12416
12416
  this.maps.selectedElementId.push(shapeElement.getAttribute('id'));
12417
12417
  }
@@ -12509,7 +12509,7 @@ class Legend {
12509
12509
  }
12510
12510
  }
12511
12511
  }
12512
- shapeHighLightAndSelection(targetElement, data, module, getValue, layerIndex) {
12512
+ shapeHighLightAndSelection(targetElement, data, legendModule, getValue, layerIndex) {
12513
12513
  if (data !== undefined) {
12514
12514
  this.updateLegendElement();
12515
12515
  this.shapeToggled = true;
@@ -12555,7 +12555,7 @@ class Legend {
12555
12555
  const selectionIndex = this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']);
12556
12556
  if (selectionIndex === -1) {
12557
12557
  this.maps.selectedLegendElementId.push(indexes['actualIndex']);
12558
- this.maps.legendSelectionClass = module;
12558
+ this.maps.legendSelectionClass = legendModule;
12559
12559
  }
12560
12560
  else {
12561
12561
  if ((checkSelection <= 1) && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
@@ -12621,13 +12621,13 @@ class Legend {
12621
12621
  }
12622
12622
  else if (j === length - 1) {
12623
12623
  this.removeShapeHighlightCollection();
12624
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12624
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12625
12625
  }
12626
12626
  }
12627
12627
  }
12628
12628
  else {
12629
12629
  this.removeShapeHighlightCollection();
12630
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'highlight');
12630
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(legendModule.opacity) ? legendModule.opacity.toString() : '1', legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12631
12631
  }
12632
12632
  }
12633
12633
  else if (getValue === 'selection') {
@@ -12637,7 +12637,7 @@ class Legend {
12637
12637
  let j = 0;
12638
12638
  while (j < this.maps.legendSelectionCollection.length) {
12639
12639
  if (shapeElement['LegendEle'] !== this.maps.legendSelectionCollection[j]['legendElement'] &&
12640
- !module.enableMultiSelect) {
12640
+ !legendModule.enableMultiSelect) {
12641
12641
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12642
12642
  const element = this.maps.legendSelectionCollection[j];
12643
12643
  const selectedLegendIndex = this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']);
@@ -12655,14 +12655,14 @@ class Legend {
12655
12655
  if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
12656
12656
  || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
12657
12657
  let multiSelection = 0;
12658
- if (module.enableMultiSelect) {
12658
+ if (legendModule.enableMultiSelect) {
12659
12659
  for (let i = 0; i < shapeElement['Elements'].length; i++) {
12660
12660
  if (targetElement.getAttribute('class') === shapeElement['Elements'][i].getAttribute('class')) {
12661
12661
  multiSelection++;
12662
12662
  }
12663
12663
  }
12664
12664
  }
12665
- if (multiSelection <= 1 && (!module.enableMultiSelect ?
12665
+ if (multiSelection <= 1 && (!legendModule.enableMultiSelect ?
12666
12666
  this.maps.legendSelection : true)) {
12667
12667
  this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']), 1);
12668
12668
  if (!isNullOrUndefined(shapeElement['LegendEle'])) {
@@ -12689,10 +12689,10 @@ class Legend {
12689
12689
  if (addId) {
12690
12690
  this.maps.selectedLegendElementId.push(indexes['actualIndex']);
12691
12691
  }
12692
- this.maps.legendSelectionClass = module;
12692
+ this.maps.legendSelectionClass = legendModule;
12693
12693
  this.removeLegend(this.shapeHighlightCollection);
12694
12694
  if (!isNullOrUndefined(legendShape)) {
12695
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'selection');
12695
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(legendModule.opacity) ? legendModule.opacity.toString() : '1', legendModule.border.color, legendModule.border.width.toString(), 'selection');
12696
12696
  const legendSelectionIndex = this.getIndexofLegend(this.maps.legendSelectionCollection, legendShape);
12697
12697
  this.maps.legendSelectionCollection[legendSelectionIndex]['MapShapeCollection']['Elements'].push(targetElement);
12698
12698
  }
@@ -17115,7 +17115,8 @@ class Zoom {
17115
17115
  this.lastScale = 1;
17116
17116
  this.maps.element.style.cursor = 'auto';
17117
17117
  if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
17118
- (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
17118
+ (!this.maps.isTileMap ? (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)
17119
+ : this.isPanningInProgress)) {
17119
17120
  let pageX;
17120
17121
  let pageY;
17121
17122
  let layerX = 0;
@@ -17167,6 +17168,7 @@ class Zoom {
17167
17168
  this.maps.trigger('panComplete', panCompleteEventArgs);
17168
17169
  }
17169
17170
  this.isPanModeEnabled = false;
17171
+ this.isPanningInProgress = false;
17170
17172
  const zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
17171
17173
  if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
17172
17174
  remove(zoomRectElement);