@syncfusion/ej2-maps 19.4.56 → 20.1.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.
- package/CHANGELOG.md +22 -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 +200 -102
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +202 -104
- 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/data-label.js +1 -1
- package/src/maps/layers/legend.js +1 -1
- package/src/maps/layers/marker.js +4 -4
- package/src/maps/maps.js +8 -1
- package/src/maps/model/export-image.js +9 -7
- package/src/maps/model/export-pdf.js +9 -9
- package/src/maps/model/print.js +22 -2
- package/src/maps/model/theme.js +4 -4
- package/src/maps/user-interaction/annotation.js +1 -1
- package/src/maps/user-interaction/tooltip.d.ts +2 -1
- package/src/maps/user-interaction/tooltip.js +17 -9
- package/src/maps/user-interaction/zoom.js +121 -68
- package/src/maps/utils/enum.d.ts +5 -1
- package/src/maps/utils/helper.d.ts +1 -1
- package/src/maps/utils/helper.js +9 -2
|
@@ -82,8 +82,13 @@ var Zoom = /** @class */ (function () {
|
|
|
82
82
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
83
83
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
84
84
|
map.scale = newZoomFactor;
|
|
85
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
86
|
-
|
|
85
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
86
|
+
map.translatePoint = map.previousPoint;
|
|
87
|
+
map.scale = map.previousScale;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
this.applyTransform();
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
89
94
|
this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
|
|
@@ -100,31 +105,38 @@ var Zoom = /** @class */ (function () {
|
|
|
100
105
|
}
|
|
101
106
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
102
107
|
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
103
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
109
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
110
|
+
map.scale = map.previousScale;
|
|
111
|
+
map.tileZoomLevel = prevLevel;
|
|
112
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
106
113
|
}
|
|
107
|
-
|
|
108
|
-
document.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
114
|
-
setTimeout(function () {
|
|
115
|
-
// if (type === 'ZoomOut') {
|
|
116
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
117
|
-
// if (element1.childElementCount) {
|
|
118
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
119
|
-
// } else {
|
|
120
|
-
// element1 = element1;
|
|
121
|
-
// }
|
|
122
|
-
// }
|
|
123
|
-
_this.applyTransform();
|
|
124
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
125
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
114
|
+
else {
|
|
115
|
+
if (document.querySelector('.GroupElement')) {
|
|
116
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
117
|
+
}
|
|
118
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
119
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
126
120
|
}
|
|
127
|
-
|
|
121
|
+
this.markerLineAnimation(map);
|
|
122
|
+
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
123
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
124
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
// if (type === 'ZoomOut') {
|
|
127
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
128
|
+
// if (element1.childElementCount) {
|
|
129
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
130
|
+
// } else {
|
|
131
|
+
// element1 = element1;
|
|
132
|
+
// }
|
|
133
|
+
// }
|
|
134
|
+
_this.applyTransform();
|
|
135
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
136
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
137
|
+
}
|
|
138
|
+
}, animationDuration);
|
|
139
|
+
}
|
|
128
140
|
}
|
|
129
141
|
this.maps.zoomNotApplied = false;
|
|
130
142
|
};
|
|
@@ -146,6 +158,7 @@ var Zoom = /** @class */ (function () {
|
|
|
146
158
|
};
|
|
147
159
|
}
|
|
148
160
|
map.trigger('zoom', zoomArgs);
|
|
161
|
+
return zoomArgs.cancel;
|
|
149
162
|
};
|
|
150
163
|
Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
|
|
151
164
|
var map = this.maps;
|
|
@@ -171,6 +184,7 @@ var Zoom = /** @class */ (function () {
|
|
|
171
184
|
var zoomRect = this.zoomingRect;
|
|
172
185
|
var maxZoom = map.zoomSettings.maxZoom;
|
|
173
186
|
var minZoom = map.zoomSettings.minZoom;
|
|
187
|
+
var isZoomCancelled;
|
|
174
188
|
if (zoomRect.height > 0 && zoomRect.width > 0) {
|
|
175
189
|
var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
|
|
176
190
|
var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
|
|
@@ -183,7 +197,11 @@ var Zoom = /** @class */ (function () {
|
|
|
183
197
|
var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
184
198
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
185
199
|
map.scale = zoomCalculationFactor;
|
|
186
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
200
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
201
|
+
if (isZoomCancelled) {
|
|
202
|
+
map.translatePoint = map.previousPoint;
|
|
203
|
+
map.scale = map.previousScale;
|
|
204
|
+
}
|
|
187
205
|
}
|
|
188
206
|
else {
|
|
189
207
|
zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
|
|
@@ -196,13 +214,21 @@ var Zoom = /** @class */ (function () {
|
|
|
196
214
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
|
|
197
215
|
(Math.pow(2, zoomCalculationFactor));
|
|
198
216
|
map.scale = (Math.pow(2, zoomCalculationFactor));
|
|
199
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
200
|
-
|
|
217
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
218
|
+
if (isZoomCancelled) {
|
|
219
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
220
|
+
map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (!isZoomCancelled) {
|
|
227
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
228
|
+
this.applyTransform(true);
|
|
229
|
+
this.maps.zoomNotApplied = false;
|
|
230
|
+
this.zoomingRect = null;
|
|
201
231
|
}
|
|
202
|
-
map.mapScaleValue = zoomCalculationFactor;
|
|
203
|
-
this.applyTransform(true);
|
|
204
|
-
this.maps.zoomNotApplied = false;
|
|
205
|
-
this.zoomingRect = null;
|
|
206
232
|
}
|
|
207
233
|
};
|
|
208
234
|
Zoom.prototype.setInteraction = function (newInteraction) {
|
|
@@ -232,6 +258,7 @@ var Zoom = /** @class */ (function () {
|
|
|
232
258
|
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
233
259
|
var zoomCalculationFactor = this.pinchFactor;
|
|
234
260
|
var zoomArgs;
|
|
261
|
+
var isZoomCancelled;
|
|
235
262
|
if (!map.isTileMap) {
|
|
236
263
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
264
|
var minBounds = map.baseMapRectBounds['min'];
|
|
@@ -247,7 +274,11 @@ var Zoom = /** @class */ (function () {
|
|
|
247
274
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
248
275
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
249
276
|
map.scale = zoomCalculationFactor;
|
|
250
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
277
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
278
|
+
if (isZoomCancelled) {
|
|
279
|
+
map.translatePoint = map.previousPoint;
|
|
280
|
+
map.scale = map.previousScale;
|
|
281
|
+
}
|
|
251
282
|
}
|
|
252
283
|
else {
|
|
253
284
|
var newTileFactor = zoomCalculationFactor;
|
|
@@ -258,10 +289,20 @@ var Zoom = /** @class */ (function () {
|
|
|
258
289
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
|
|
259
290
|
(Math.pow(2, newTileFactor));
|
|
260
291
|
map.scale = (Math.pow(2, newTileFactor));
|
|
261
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
262
|
-
|
|
292
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
293
|
+
if (isZoomCancelled) {
|
|
294
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
295
|
+
map.scale = map.previousScale;
|
|
296
|
+
map.tileZoomLevel = prevLevel;
|
|
297
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (!isZoomCancelled) {
|
|
304
|
+
this.applyTransform();
|
|
263
305
|
}
|
|
264
|
-
this.applyTransform();
|
|
265
306
|
};
|
|
266
307
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
267
308
|
var map = this.maps;
|
|
@@ -545,10 +586,10 @@ var Zoom = /** @class */ (function () {
|
|
|
545
586
|
}
|
|
546
587
|
var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
547
588
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
548
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] :
|
|
589
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
|
|
549
590
|
var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
550
591
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
551
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] :
|
|
592
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
|
|
552
593
|
var offset = markerSettings.offset;
|
|
553
594
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
|
|
554
595
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -568,10 +609,10 @@ var Zoom = /** @class */ (function () {
|
|
|
568
609
|
nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
|
|
569
610
|
markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
|
|
570
611
|
markerCounts += (eventArgs.cancel) ? 1 : 0;
|
|
571
|
-
_this.maps.markerNullCount = (
|
|
572
|
-
? _this.maps.markerNullCount : _this.maps.markerNullCount
|
|
612
|
+
_this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
613
|
+
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
573
614
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
574
|
-
if (markerSVGObject.childElementCount === (
|
|
615
|
+
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
575
616
|
layerElement.appendChild(markerSVGObject);
|
|
576
617
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
577
618
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
@@ -579,7 +620,7 @@ var Zoom = /** @class */ (function () {
|
|
|
579
620
|
clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
580
621
|
}
|
|
581
622
|
}
|
|
582
|
-
if (markerTemplateElements.childElementCount === (
|
|
623
|
+
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
583
624
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
584
625
|
if (scale >= 1) {
|
|
585
626
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
@@ -978,8 +1019,13 @@ var Zoom = /** @class */ (function () {
|
|
|
978
1019
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
979
1020
|
map.zoomTranslatePoint = map.translatePoint;
|
|
980
1021
|
map.scale = zoomFactor;
|
|
981
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
982
|
-
|
|
1022
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
1023
|
+
map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
|
|
1024
|
+
map.scale = map.previousScale;
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
this.applyTransform(true);
|
|
1028
|
+
}
|
|
983
1029
|
}
|
|
984
1030
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
985
1031
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
@@ -996,29 +1042,36 @@ var Zoom = /** @class */ (function () {
|
|
|
996
1042
|
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
997
1043
|
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
998
1044
|
}
|
|
999
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1045
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
1046
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
1047
|
+
map.scale = map.previousScale;
|
|
1048
|
+
map.tileZoomLevel = prevLevel;
|
|
1049
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
1004
1050
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1011
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
1012
|
-
setTimeout(function () {
|
|
1013
|
-
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1014
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1015
|
-
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
1051
|
+
else {
|
|
1052
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1053
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1054
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
1055
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
1016
1056
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
1057
|
+
if (document.querySelector('.GroupElement')) {
|
|
1058
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
1020
1059
|
}
|
|
1021
|
-
|
|
1060
|
+
this.markerLineAnimation(map);
|
|
1061
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
1062
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1063
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
1064
|
+
setTimeout(function () {
|
|
1065
|
+
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1066
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1067
|
+
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
1068
|
+
}
|
|
1069
|
+
_this.applyTransform(true);
|
|
1070
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
1071
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
1072
|
+
}
|
|
1073
|
+
}, animationDuration);
|
|
1074
|
+
}
|
|
1022
1075
|
}
|
|
1023
1076
|
this.maps.zoomNotApplied = false;
|
|
1024
1077
|
}
|
|
@@ -1027,7 +1080,7 @@ var Zoom = /** @class */ (function () {
|
|
|
1027
1080
|
var map = this.maps;
|
|
1028
1081
|
this.toolBarGroup = map.renderer.createGroup({
|
|
1029
1082
|
id: map.element.id + '_Zooming_KitCollection',
|
|
1030
|
-
opacity: map.theme.toLowerCase() === '
|
|
1083
|
+
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
1031
1084
|
});
|
|
1032
1085
|
var kitHeight = 16;
|
|
1033
1086
|
var kitWidth = 16;
|
|
@@ -1437,14 +1490,14 @@ var Zoom = /** @class */ (function () {
|
|
|
1437
1490
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1438
1491
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
1439
1492
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
1440
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
1441
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
1493
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
1494
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
1442
1495
|
}
|
|
1443
1496
|
}
|
|
1444
1497
|
}
|
|
1445
1498
|
}
|
|
1446
1499
|
else {
|
|
1447
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
1500
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
1448
1501
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1449
1502
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
1450
1503
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
package/src/maps/utils/enum.d.ts
CHANGED
|
@@ -40,7 +40,11 @@ export declare type MapsTheme =
|
|
|
40
40
|
/** Renders a map with Bootstrap5 theme. */
|
|
41
41
|
'Bootstrap5' |
|
|
42
42
|
/** Render a map with Bootstrap5 dark theme. */
|
|
43
|
-
'Bootstrap5Dark'
|
|
43
|
+
'Bootstrap5Dark' |
|
|
44
|
+
/** Renders a map with Fluent theme. */
|
|
45
|
+
'Fluent' |
|
|
46
|
+
/** Render a map with Fluent dark theme. */
|
|
47
|
+
'FluentDark';
|
|
44
48
|
/**
|
|
45
49
|
* Defines the position of the legend.
|
|
46
50
|
*/
|
|
@@ -841,7 +841,7 @@ export declare function Internalize(maps: Maps, value: number): string;
|
|
|
841
841
|
* @returns {Function} - Returns the function
|
|
842
842
|
* @private
|
|
843
843
|
*/
|
|
844
|
-
export declare function getTemplateFunction(template: string): any;
|
|
844
|
+
export declare function getTemplateFunction(template: string, maps: Maps): any;
|
|
845
845
|
/**
|
|
846
846
|
* Function to get element from id.
|
|
847
847
|
*
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -1276,7 +1276,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
|
|
|
1276
1276
|
*/
|
|
1277
1277
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1278
1278
|
export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1279
|
-
templateFn = getTemplateFunction(eventArgs.template);
|
|
1279
|
+
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1280
1280
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
1281
1281
|
var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
|
|
1282
1282
|
var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
|
|
@@ -2312,7 +2312,7 @@ export function Internalize(maps, value) {
|
|
|
2312
2312
|
* @private
|
|
2313
2313
|
*/
|
|
2314
2314
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2315
|
-
export function getTemplateFunction(template) {
|
|
2315
|
+
export function getTemplateFunction(template, maps) {
|
|
2316
2316
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2317
2317
|
var templateFn = null;
|
|
2318
2318
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2321,6 +2321,9 @@ export function getTemplateFunction(template) {
|
|
|
2321
2321
|
if (document.querySelectorAll(template).length) {
|
|
2322
2322
|
templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
|
|
2323
2323
|
}
|
|
2324
|
+
else if (maps.isVue || maps.isVue3) {
|
|
2325
|
+
templateFn = templateComplier(template);
|
|
2326
|
+
}
|
|
2324
2327
|
}
|
|
2325
2328
|
catch (e) {
|
|
2326
2329
|
templateFn = templateComplier(template);
|
|
@@ -2725,6 +2728,7 @@ export function createTooltip(id, text, top, left, fontSize) {
|
|
|
2725
2728
|
'left:' + left.toString() + 'px;' +
|
|
2726
2729
|
'color: #000000; ' +
|
|
2727
2730
|
'background:' + '#FFFFFF' + ';' +
|
|
2731
|
+
'z-index: 2;' +
|
|
2728
2732
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2729
2733
|
if (!tooltip) {
|
|
2730
2734
|
tooltip = createElement('div', {
|
|
@@ -2926,6 +2930,9 @@ export function changeBorderWidth(element, index, scale, maps) {
|
|
|
2926
2930
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2927
2931
|
}
|
|
2928
2932
|
}
|
|
2933
|
+
else {
|
|
2934
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2935
|
+
}
|
|
2929
2936
|
}
|
|
2930
2937
|
else {
|
|
2931
2938
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|