@syncfusion/ej2-maps 19.4.42 → 19.4.53
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.
- package/CHANGELOG.md +24 -0
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +195 -48
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +195 -48
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/layer-panel.js +3 -2
- package/src/maps/layers/legend.d.ts +41 -2
- package/src/maps/layers/legend.js +43 -11
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +5 -1
- package/src/maps/maps.js +107 -13
- package/src/maps/user-interaction/highlight.d.ts +9 -1
- package/src/maps/user-interaction/highlight.js +18 -11
- package/src/maps/user-interaction/selection.d.ts +9 -1
- package/src/maps/user-interaction/selection.js +17 -10
- package/src/maps/user-interaction/zoom.d.ts +4 -1
- package/src/maps/user-interaction/zoom.js +9 -3
|
@@ -80,24 +80,31 @@ var Selection = /** @class */ (function () {
|
|
|
80
80
|
this.selectionType = 'navigationline';
|
|
81
81
|
}
|
|
82
82
|
if (this.selectionsettings.enable) {
|
|
83
|
-
this.
|
|
84
|
-
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
85
|
-
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
86
|
-
}
|
|
87
|
-
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible) ?
|
|
88
|
-
this.maps.legendModule.shapeToggled : true;
|
|
89
|
-
if (shapeToggled) {
|
|
90
|
-
this.selectMap(targetElement, shapeData, data);
|
|
91
|
-
}
|
|
83
|
+
this.selectElement(targetElement, layerIndex, data, shapeData);
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
|
-
else if (this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable &&
|
|
86
|
+
else if ((this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable && this.maps.legendModule) &&
|
|
95
87
|
!isNullOrUndefined(targetElement.id) && targetElement.id.indexOf('_Text') === -1 &&
|
|
96
88
|
(targetElement.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') > -1 ||
|
|
97
89
|
targetElement.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1)) {
|
|
98
90
|
this.maps.legendModule.legendHighLightAndSelection(targetElement, 'selection');
|
|
99
91
|
}
|
|
100
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* @private
|
|
95
|
+
*/
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
+
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
98
|
+
this.maps.mapSelect = targetElement ? true : false;
|
|
99
|
+
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
100
|
+
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
101
|
+
}
|
|
102
|
+
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible && this.maps.legendModule) ?
|
|
103
|
+
this.maps.legendModule.shapeToggled : true;
|
|
104
|
+
if (shapeToggled) {
|
|
105
|
+
this.selectMap(targetElement, shapeData, data);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
101
108
|
// eslint-disable-next-line valid-jsdoc
|
|
102
109
|
/**
|
|
103
110
|
* Public method for selection
|
|
@@ -103,7 +103,10 @@ export declare class Zoom {
|
|
|
103
103
|
private dataLabelTranslate;
|
|
104
104
|
private markerTranslate;
|
|
105
105
|
private markerLineAnimation;
|
|
106
|
-
|
|
106
|
+
/**
|
|
107
|
+
* @private
|
|
108
|
+
*/
|
|
109
|
+
panning(direction: PanDirection, xDifference: number, yDifference: number, mouseLocation?: PointerEvent | TouchEvent | KeyboardEvent): void;
|
|
107
110
|
private toAlignSublayer;
|
|
108
111
|
toolBarZooming(zoomFactor: number, type: string): void;
|
|
109
112
|
createZoomingToolbars(): void;
|
|
@@ -847,6 +847,9 @@ var Zoom = /** @class */ (function () {
|
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
};
|
|
850
|
+
/**
|
|
851
|
+
* @private
|
|
852
|
+
*/
|
|
850
853
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
851
854
|
var map = this.maps;
|
|
852
855
|
var panArgs;
|
|
@@ -865,6 +868,8 @@ var Zoom = /** @class */ (function () {
|
|
|
865
868
|
yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
|
|
866
869
|
this.maps.mergeCluster();
|
|
867
870
|
if (!map.isTileMap) {
|
|
871
|
+
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
872
|
+
var legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
|
|
868
873
|
x = translatePoint.x - xDifference / scale;
|
|
869
874
|
y = translatePoint.y - yDifference / scale;
|
|
870
875
|
var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
|
|
@@ -872,7 +877,7 @@ var Zoom = /** @class */ (function () {
|
|
|
872
877
|
var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
|
|
873
878
|
((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
|
|
874
879
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
875
|
-
((layerRect.top + layerRect.height + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
880
|
+
((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
876
881
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
877
882
|
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
|
|
878
883
|
panArgs = {
|
|
@@ -1285,8 +1290,9 @@ var Zoom = /** @class */ (function () {
|
|
|
1285
1290
|
x = (size.width - toolBarSize.width) - padding;
|
|
1286
1291
|
break;
|
|
1287
1292
|
}
|
|
1288
|
-
|
|
1289
|
-
element.style.
|
|
1293
|
+
var extraPosition = map.getExtraPosition();
|
|
1294
|
+
element.style.left = x + extraPosition.x + 'px';
|
|
1295
|
+
element.style.top = y + extraPosition.y + 'px';
|
|
1290
1296
|
var color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
|
|
1291
1297
|
var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
|
|
1292
1298
|
'.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
|