@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
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -1257,7 +1257,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1257
1257
|
*/
|
|
1258
1258
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1259
1259
|
function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1260
|
-
templateFn = getTemplateFunction(eventArgs.template);
|
|
1260
|
+
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1261
1261
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
1262
1262
|
var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
|
|
1263
1263
|
var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
|
|
@@ -2292,7 +2292,7 @@ function Internalize(maps, value) {
|
|
|
2292
2292
|
* @private
|
|
2293
2293
|
*/
|
|
2294
2294
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2295
|
-
function getTemplateFunction(template) {
|
|
2295
|
+
function getTemplateFunction(template, maps) {
|
|
2296
2296
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2297
2297
|
var templateFn = null;
|
|
2298
2298
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2300,6 +2300,9 @@ function getTemplateFunction(template) {
|
|
|
2300
2300
|
if (document.querySelectorAll(template).length) {
|
|
2301
2301
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2302
2302
|
}
|
|
2303
|
+
else if (maps.isVue || maps.isVue3) {
|
|
2304
|
+
templateFn = compile(template);
|
|
2305
|
+
}
|
|
2303
2306
|
}
|
|
2304
2307
|
catch (e) {
|
|
2305
2308
|
templateFn = compile(template);
|
|
@@ -2703,6 +2706,7 @@ function createTooltip(id, text, top, left, fontSize) {
|
|
|
2703
2706
|
'left:' + left.toString() + 'px;' +
|
|
2704
2707
|
'color: #000000; ' +
|
|
2705
2708
|
'background:' + '#FFFFFF' + ';' +
|
|
2709
|
+
'z-index: 2;' +
|
|
2706
2710
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2707
2711
|
if (!tooltip) {
|
|
2708
2712
|
tooltip = createElement('div', {
|
|
@@ -2903,6 +2907,9 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2903
2907
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2904
2908
|
}
|
|
2905
2909
|
}
|
|
2910
|
+
else {
|
|
2911
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2912
|
+
}
|
|
2906
2913
|
}
|
|
2907
2914
|
else {
|
|
2908
2915
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
@@ -3431,11 +3438,11 @@ function getShapeColor(theme) {
|
|
|
3431
3438
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3432
3439
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3433
3440
|
break;
|
|
3434
|
-
case '
|
|
3441
|
+
case 'fluent':
|
|
3435
3442
|
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3436
3443
|
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3437
3444
|
break;
|
|
3438
|
-
case '
|
|
3445
|
+
case 'fluentdark':
|
|
3439
3446
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3440
3447
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3441
3448
|
break;
|
|
@@ -3724,7 +3731,7 @@ function getThemeStyle(theme) {
|
|
|
3724
3731
|
shapeFill: '#495057'
|
|
3725
3732
|
};
|
|
3726
3733
|
break;
|
|
3727
|
-
case '
|
|
3734
|
+
case 'fluent':
|
|
3728
3735
|
style = {
|
|
3729
3736
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3730
3737
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -3747,7 +3754,7 @@ function getThemeStyle(theme) {
|
|
|
3747
3754
|
shapeFill: '#F3F2F1'
|
|
3748
3755
|
};
|
|
3749
3756
|
break;
|
|
3750
|
-
case '
|
|
3757
|
+
case 'fluentdark':
|
|
3751
3758
|
style = {
|
|
3752
3759
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3753
3760
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -4876,10 +4883,10 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4876
4883
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4877
4884
|
var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4878
4885
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4879
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) :
|
|
4886
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
|
|
4880
4887
|
var lat = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
4881
4888
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
4882
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) :
|
|
4889
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
|
|
4883
4890
|
var offset = markerSettings.offset;
|
|
4884
4891
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
|
|
4885
4892
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -4924,7 +4931,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4924
4931
|
_this.maps.renderReactTemplates();
|
|
4925
4932
|
}
|
|
4926
4933
|
}
|
|
4927
|
-
if (markerTemplateEle.childElementCount === (
|
|
4934
|
+
if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
4928
4935
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
|
|
4929
4936
|
if (_this.maps.checkInitialRender) {
|
|
4930
4937
|
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
@@ -5174,7 +5181,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5174
5181
|
if ((target.indexOf('_cluster_') > -1)) {
|
|
5175
5182
|
var isClusterSame = false;
|
|
5176
5183
|
var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
|
|
5177
|
-
var indexes = clusterElement.innerHTML.split(',').map(Number);
|
|
5184
|
+
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
|
|
5178
5185
|
collection_1 = [];
|
|
5179
5186
|
for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
|
|
5180
5187
|
var i = indexes_1[_i];
|
|
@@ -7039,7 +7046,7 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7039
7046
|
if (argsData.cancel) {
|
|
7040
7047
|
return;
|
|
7041
7048
|
}
|
|
7042
|
-
templateFn = getTemplateFunction(argsData.content);
|
|
7049
|
+
templateFn = getTemplateFunction(argsData.content, _this.map);
|
|
7043
7050
|
if (templateFn && templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex).length) {
|
|
7044
7051
|
templateElement = Array.prototype.slice.call(templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex));
|
|
7045
7052
|
var length_1 = templateElement.length;
|
|
@@ -7166,6 +7173,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7166
7173
|
* Resize the map
|
|
7167
7174
|
*/
|
|
7168
7175
|
_this.isResize = false;
|
|
7176
|
+
/**
|
|
7177
|
+
* @private
|
|
7178
|
+
*/
|
|
7179
|
+
_this.isReset = false;
|
|
7169
7180
|
/** @private */
|
|
7170
7181
|
_this.baseSize = new Size(0, 0);
|
|
7171
7182
|
/** @public */
|
|
@@ -8836,7 +8847,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8836
8847
|
var collection = Object.keys(newProp.layers[x]);
|
|
8837
8848
|
for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
|
|
8838
8849
|
var collectionProp = collection_1[_b];
|
|
8839
|
-
if (collectionProp === '
|
|
8850
|
+
if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
|
|
8851
|
+
this.isReset = true;
|
|
8852
|
+
}
|
|
8853
|
+
else if (collectionProp === 'markerSettings') {
|
|
8840
8854
|
isMarker = true;
|
|
8841
8855
|
}
|
|
8842
8856
|
else if (collectionProp === 'staticMapType') {
|
|
@@ -9938,7 +9952,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
9938
9952
|
_this.value[index] = { rightWidth: xpositionEnds, leftWidth: xpositionStart, heightTop: start, heightBottom: end };
|
|
9939
9953
|
var labelElement;
|
|
9940
9954
|
if (eventargs_1.template !== '') {
|
|
9941
|
-
templateFn = getTemplateFunction(eventargs_1.template);
|
|
9955
|
+
templateFn = getTemplateFunction(eventargs_1.template, _this.maps);
|
|
9942
9956
|
var templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
|
|
9943
9957
|
datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
9944
9958
|
templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
|
|
@@ -11550,7 +11564,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11550
11564
|
data[_this.maps.legendSettings.showLegendPath];
|
|
11551
11565
|
if (marker$$1.visible && showLegend && (!isNullOrUndefined(data['latitude'])) && (!isNullOrUndefined(data['longitude']))) {
|
|
11552
11566
|
if (marker$$1.template) {
|
|
11553
|
-
templateFn = getTemplateFunction(marker$$1.template);
|
|
11567
|
+
templateFn = getTemplateFunction(marker$$1.template, _this.maps);
|
|
11554
11568
|
var templateElement = templateFn(_this.maps);
|
|
11555
11569
|
var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
11556
11570
|
templateElement;
|
|
@@ -13043,6 +13057,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13043
13057
|
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor
|
|
13044
13058
|
});
|
|
13045
13059
|
}
|
|
13060
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13061
|
+
if (_this.maps.isVue || _this.maps.isVue3) {
|
|
13062
|
+
_this.svgTooltip.controlInstance = _this.maps;
|
|
13063
|
+
}
|
|
13046
13064
|
_this.svgTooltip.opacity = _this.maps.themeStyle.tooltipFillOpacity || _this.svgTooltip.opacity;
|
|
13047
13065
|
_this.svgTooltip.appendTo(tooltipEle);
|
|
13048
13066
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13056,9 +13074,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13056
13074
|
}
|
|
13057
13075
|
}
|
|
13058
13076
|
else {
|
|
13059
|
-
_this.
|
|
13060
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13061
|
-
_this.maps.clearTemplate();
|
|
13077
|
+
_this.clearTooltip();
|
|
13062
13078
|
}
|
|
13063
13079
|
});
|
|
13064
13080
|
if (this.svgTooltip) {
|
|
@@ -13073,9 +13089,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13073
13089
|
});
|
|
13074
13090
|
}
|
|
13075
13091
|
else {
|
|
13076
|
-
this.
|
|
13077
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13078
|
-
this.maps.clearTemplate();
|
|
13092
|
+
this.clearTooltip();
|
|
13079
13093
|
}
|
|
13080
13094
|
}
|
|
13081
13095
|
else {
|
|
@@ -13085,9 +13099,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13085
13099
|
this.maps.notify(click, this);
|
|
13086
13100
|
}
|
|
13087
13101
|
else {
|
|
13088
|
-
this.
|
|
13089
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13090
|
-
this.maps.clearTemplate();
|
|
13102
|
+
this.clearTooltip();
|
|
13091
13103
|
}
|
|
13092
13104
|
}
|
|
13093
13105
|
};
|
|
@@ -13133,8 +13145,18 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13133
13145
|
}
|
|
13134
13146
|
};
|
|
13135
13147
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
13148
|
+
var isTooltipRemoved = false;
|
|
13136
13149
|
if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
|
|
13137
13150
|
remove(document.getElementsByClassName('EJ2-maps-Tooltip')[0]);
|
|
13151
|
+
isTooltipRemoved = true;
|
|
13152
|
+
}
|
|
13153
|
+
return isTooltipRemoved;
|
|
13154
|
+
};
|
|
13155
|
+
MapsTooltip.prototype.clearTooltip = function () {
|
|
13156
|
+
var isTooltipRemoved = this.removeTooltip();
|
|
13157
|
+
if (isTooltipRemoved) {
|
|
13158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13159
|
+
this.maps.clearTemplate();
|
|
13138
13160
|
}
|
|
13139
13161
|
};
|
|
13140
13162
|
// eslint-disable-next-line valid-jsdoc
|
|
@@ -13268,8 +13290,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13268
13290
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
13269
13291
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13270
13292
|
map.scale = newZoomFactor;
|
|
13271
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13272
|
-
|
|
13293
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13294
|
+
map.translatePoint = map.previousPoint;
|
|
13295
|
+
map.scale = map.previousScale;
|
|
13296
|
+
}
|
|
13297
|
+
else {
|
|
13298
|
+
this.applyTransform();
|
|
13299
|
+
}
|
|
13273
13300
|
}
|
|
13274
13301
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
13275
13302
|
this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
|
|
@@ -13286,31 +13313,38 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13286
13313
|
}
|
|
13287
13314
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13288
13315
|
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13289
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13290
|
-
|
|
13291
|
-
|
|
13316
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13317
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13318
|
+
map.scale = map.previousScale;
|
|
13319
|
+
map.tileZoomLevel = prevLevel;
|
|
13320
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13292
13321
|
}
|
|
13293
|
-
|
|
13294
|
-
document.
|
|
13322
|
+
else {
|
|
13323
|
+
if (document.querySelector('.GroupElement')) {
|
|
13324
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
13325
|
+
}
|
|
13326
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13327
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13328
|
+
}
|
|
13329
|
+
this.markerLineAnimation(map);
|
|
13330
|
+
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
13331
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13332
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13333
|
+
setTimeout(function () {
|
|
13334
|
+
// if (type === 'ZoomOut') {
|
|
13335
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13336
|
+
// if (element1.childElementCount) {
|
|
13337
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13338
|
+
// } else {
|
|
13339
|
+
// element1 = element1;
|
|
13340
|
+
// }
|
|
13341
|
+
// }
|
|
13342
|
+
_this.applyTransform();
|
|
13343
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13344
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13345
|
+
}
|
|
13346
|
+
}, animationDuration);
|
|
13295
13347
|
}
|
|
13296
|
-
this.markerLineAnimation(map);
|
|
13297
|
-
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
13298
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13299
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13300
|
-
setTimeout(function () {
|
|
13301
|
-
// if (type === 'ZoomOut') {
|
|
13302
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13303
|
-
// if (element1.childElementCount) {
|
|
13304
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13305
|
-
// } else {
|
|
13306
|
-
// element1 = element1;
|
|
13307
|
-
// }
|
|
13308
|
-
// }
|
|
13309
|
-
_this.applyTransform();
|
|
13310
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13311
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13312
|
-
}
|
|
13313
|
-
}, animationDuration);
|
|
13314
13348
|
}
|
|
13315
13349
|
this.maps.zoomNotApplied = false;
|
|
13316
13350
|
};
|
|
@@ -13332,6 +13366,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13332
13366
|
};
|
|
13333
13367
|
}
|
|
13334
13368
|
map.trigger('zoom', zoomArgs);
|
|
13369
|
+
return zoomArgs.cancel;
|
|
13335
13370
|
};
|
|
13336
13371
|
Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
|
|
13337
13372
|
var map = this.maps;
|
|
@@ -13357,6 +13392,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13357
13392
|
var zoomRect = this.zoomingRect;
|
|
13358
13393
|
var maxZoom = map.zoomSettings.maxZoom;
|
|
13359
13394
|
var minZoom = map.zoomSettings.minZoom;
|
|
13395
|
+
var isZoomCancelled;
|
|
13360
13396
|
if (zoomRect.height > 0 && zoomRect.width > 0) {
|
|
13361
13397
|
var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
|
|
13362
13398
|
var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
|
|
@@ -13369,7 +13405,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13369
13405
|
var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
13370
13406
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13371
13407
|
map.scale = zoomCalculationFactor;
|
|
13372
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13408
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13409
|
+
if (isZoomCancelled) {
|
|
13410
|
+
map.translatePoint = map.previousPoint;
|
|
13411
|
+
map.scale = map.previousScale;
|
|
13412
|
+
}
|
|
13373
13413
|
}
|
|
13374
13414
|
else {
|
|
13375
13415
|
zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
|
|
@@ -13382,13 +13422,21 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13382
13422
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
|
|
13383
13423
|
(Math.pow(2, zoomCalculationFactor));
|
|
13384
13424
|
map.scale = (Math.pow(2, zoomCalculationFactor));
|
|
13385
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13386
|
-
|
|
13425
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13426
|
+
if (isZoomCancelled) {
|
|
13427
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13428
|
+
map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
|
|
13429
|
+
}
|
|
13430
|
+
else {
|
|
13431
|
+
map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
|
|
13432
|
+
}
|
|
13433
|
+
}
|
|
13434
|
+
if (!isZoomCancelled) {
|
|
13435
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
13436
|
+
this.applyTransform(true);
|
|
13437
|
+
this.maps.zoomNotApplied = false;
|
|
13438
|
+
this.zoomingRect = null;
|
|
13387
13439
|
}
|
|
13388
|
-
map.mapScaleValue = zoomCalculationFactor;
|
|
13389
|
-
this.applyTransform(true);
|
|
13390
|
-
this.maps.zoomNotApplied = false;
|
|
13391
|
-
this.zoomingRect = null;
|
|
13392
13440
|
}
|
|
13393
13441
|
};
|
|
13394
13442
|
Zoom.prototype.setInteraction = function (newInteraction) {
|
|
@@ -13417,6 +13465,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13417
13465
|
this.pinchFactor *= newScale;
|
|
13418
13466
|
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
13419
13467
|
var zoomCalculationFactor = this.pinchFactor;
|
|
13468
|
+
var isZoomCancelled;
|
|
13420
13469
|
if (!map.isTileMap) {
|
|
13421
13470
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13422
13471
|
var minBounds = map.baseMapRectBounds['min'];
|
|
@@ -13432,7 +13481,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13432
13481
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
13433
13482
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13434
13483
|
map.scale = zoomCalculationFactor;
|
|
13435
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13484
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13485
|
+
if (isZoomCancelled) {
|
|
13486
|
+
map.translatePoint = map.previousPoint;
|
|
13487
|
+
map.scale = map.previousScale;
|
|
13488
|
+
}
|
|
13436
13489
|
}
|
|
13437
13490
|
else {
|
|
13438
13491
|
var newTileFactor = zoomCalculationFactor;
|
|
@@ -13443,10 +13496,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13443
13496
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
|
|
13444
13497
|
(Math.pow(2, newTileFactor));
|
|
13445
13498
|
map.scale = (Math.pow(2, newTileFactor));
|
|
13446
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13447
|
-
|
|
13499
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13500
|
+
if (isZoomCancelled) {
|
|
13501
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13502
|
+
map.scale = map.previousScale;
|
|
13503
|
+
map.tileZoomLevel = prevLevel;
|
|
13504
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13505
|
+
}
|
|
13506
|
+
else {
|
|
13507
|
+
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
13508
|
+
}
|
|
13509
|
+
}
|
|
13510
|
+
if (!isZoomCancelled) {
|
|
13511
|
+
this.applyTransform();
|
|
13448
13512
|
}
|
|
13449
|
-
this.applyTransform();
|
|
13450
13513
|
};
|
|
13451
13514
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
13452
13515
|
var map = this.maps;
|
|
@@ -13725,10 +13788,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13725
13788
|
}
|
|
13726
13789
|
var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
13727
13790
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
13728
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] :
|
|
13791
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
|
|
13729
13792
|
var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
13730
13793
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
13731
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] :
|
|
13794
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
|
|
13732
13795
|
var offset = markerSettings.offset;
|
|
13733
13796
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
|
|
13734
13797
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -13748,10 +13811,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13748
13811
|
nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
|
|
13749
13812
|
markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13750
13813
|
markerCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13751
|
-
_this.maps.markerNullCount = (
|
|
13752
|
-
? _this.maps.markerNullCount : _this.maps.markerNullCount
|
|
13814
|
+
_this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
13815
|
+
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
13753
13816
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
13754
|
-
if (markerSVGObject.childElementCount === (
|
|
13817
|
+
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
13755
13818
|
layerElement.appendChild(markerSVGObject);
|
|
13756
13819
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
13757
13820
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
@@ -13759,7 +13822,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13759
13822
|
clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
13760
13823
|
}
|
|
13761
13824
|
}
|
|
13762
|
-
if (markerTemplateElements.childElementCount === (
|
|
13825
|
+
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
13763
13826
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
13764
13827
|
if (scale >= 1) {
|
|
13765
13828
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
@@ -14157,8 +14220,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14157
14220
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
14158
14221
|
map.zoomTranslatePoint = map.translatePoint;
|
|
14159
14222
|
map.scale = zoomFactor;
|
|
14160
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
14161
|
-
|
|
14223
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
14224
|
+
map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
|
|
14225
|
+
map.scale = map.previousScale;
|
|
14226
|
+
}
|
|
14227
|
+
else {
|
|
14228
|
+
this.applyTransform(true);
|
|
14229
|
+
}
|
|
14162
14230
|
}
|
|
14163
14231
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
14164
14232
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
@@ -14175,25 +14243,32 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14175
14243
|
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
14176
14244
|
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
14177
14245
|
}
|
|
14178
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14246
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
14247
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
14248
|
+
map.scale = map.previousScale;
|
|
14249
|
+
map.tileZoomLevel = prevLevel;
|
|
14250
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
14183
14251
|
}
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
14190
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
14191
|
-
setTimeout(function () {
|
|
14192
|
-
_this.applyTransform(true);
|
|
14193
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
14194
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
14252
|
+
else {
|
|
14253
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14254
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14255
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
14256
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
14195
14257
|
}
|
|
14196
|
-
|
|
14258
|
+
if (document.querySelector('.GroupElement')) {
|
|
14259
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
14260
|
+
}
|
|
14261
|
+
this.markerLineAnimation(map);
|
|
14262
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
14263
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
14264
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
14265
|
+
setTimeout(function () {
|
|
14266
|
+
_this.applyTransform(true);
|
|
14267
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
14268
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
14269
|
+
}
|
|
14270
|
+
}, animationDuration);
|
|
14271
|
+
}
|
|
14197
14272
|
}
|
|
14198
14273
|
this.maps.zoomNotApplied = false;
|
|
14199
14274
|
}
|
|
@@ -14202,7 +14277,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14202
14277
|
var map = this.maps;
|
|
14203
14278
|
this.toolBarGroup = map.renderer.createGroup({
|
|
14204
14279
|
id: map.element.id + '_Zooming_KitCollection',
|
|
14205
|
-
opacity: map.theme.toLowerCase() === '
|
|
14280
|
+
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
14206
14281
|
});
|
|
14207
14282
|
var kitHeight = 16;
|
|
14208
14283
|
var kitWidth = 16;
|
|
@@ -14606,14 +14681,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14606
14681
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14607
14682
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
14608
14683
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
14609
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14610
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14684
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14685
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14611
14686
|
}
|
|
14612
14687
|
}
|
|
14613
14688
|
}
|
|
14614
14689
|
}
|
|
14615
14690
|
else {
|
|
14616
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14691
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14617
14692
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14618
14693
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
14619
14694
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
|
@@ -14822,7 +14897,27 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
14822
14897
|
Print.prototype.getHTMLContent = function (elements) {
|
|
14823
14898
|
var elementRect = getClientElement(this.control.element.id);
|
|
14824
14899
|
var div = createElement('div');
|
|
14825
|
-
|
|
14900
|
+
var divElement = this.control.element.cloneNode(true);
|
|
14901
|
+
if (this.control.isTileMap) {
|
|
14902
|
+
for (var i = 0; i < divElement.childElementCount; i++) {
|
|
14903
|
+
if (divElement.children[i].id === this.control.element.id + '_tile_parent') {
|
|
14904
|
+
divElement.children[i].style.removeProperty('height');
|
|
14905
|
+
divElement.children[i].style.removeProperty('width');
|
|
14906
|
+
divElement.children[i].style.removeProperty('top');
|
|
14907
|
+
divElement.children[i].style.removeProperty('left');
|
|
14908
|
+
divElement.children[i].style.removeProperty('right');
|
|
14909
|
+
divElement.children[i].style.removeProperty('overflow');
|
|
14910
|
+
var svgElement = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
|
|
14911
|
+
divElement.children[i].children[0].style.overflow = 'hidden';
|
|
14912
|
+
divElement.children[i].children[0].style.position = 'absolute';
|
|
14913
|
+
divElement.children[i].children[0].style.height = svgElement.style.height;
|
|
14914
|
+
divElement.children[i].children[0].style.width = svgElement.style.width;
|
|
14915
|
+
divElement.children[i].children[0].style.left = svgElement.style.left;
|
|
14916
|
+
divElement.children[i].children[0].style.top = svgElement.style.top;
|
|
14917
|
+
break;
|
|
14918
|
+
}
|
|
14919
|
+
}
|
|
14920
|
+
}
|
|
14826
14921
|
if (elements) {
|
|
14827
14922
|
if (elements instanceof Array) {
|
|
14828
14923
|
Array.prototype.forEach.call(elements, function (value) {
|
|
@@ -14837,7 +14932,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
14837
14932
|
}
|
|
14838
14933
|
}
|
|
14839
14934
|
else {
|
|
14840
|
-
div.appendChild(
|
|
14935
|
+
div.appendChild(divElement);
|
|
14841
14936
|
}
|
|
14842
14937
|
return div;
|
|
14843
14938
|
};
|
|
@@ -14902,7 +14997,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14902
14997
|
var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
14903
14998
|
var toolbarEle = document.getElementById(_this.control.element.id + '_ToolBar');
|
|
14904
14999
|
var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
|
|
14905
|
-
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
14906
15000
|
var svgDataElement;
|
|
14907
15001
|
var tileSvg;
|
|
14908
15002
|
var svgObject = getElementByID(_this.control.element.id + '_svg').cloneNode(true);
|
|
@@ -14947,7 +15041,9 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14947
15041
|
image_1.src = url;
|
|
14948
15042
|
}
|
|
14949
15043
|
else {
|
|
14950
|
-
var
|
|
15044
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
15045
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
15046
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
14951
15047
|
var imgxHttp = new XMLHttpRequest();
|
|
14952
15048
|
var imgTileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
14953
15049
|
var _loop_1 = function (i) {
|
|
@@ -14966,16 +15062,17 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14966
15062
|
if (i === 0 || i === imgTileLength_1 + 1) {
|
|
14967
15063
|
if (i === 0) {
|
|
14968
15064
|
ctxt_1.setTransform(1, 0, 0, 1, 0, 0);
|
|
14969
|
-
ctxt_1.rect(0,
|
|
15065
|
+
ctxt_1.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
14970
15066
|
ctxt_1.clip();
|
|
14971
15067
|
}
|
|
14972
15068
|
else {
|
|
14973
|
-
ctxt_1.setTransform(1, 0, 0, 1,
|
|
15069
|
+
ctxt_1.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
14974
15070
|
}
|
|
14975
15071
|
}
|
|
14976
15072
|
else {
|
|
14977
|
-
|
|
14978
|
-
|
|
15073
|
+
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
15074
|
+
ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) +
|
|
15075
|
+
top_1);
|
|
14979
15076
|
}
|
|
14980
15077
|
ctxt_1.drawImage(exportTileImg, 0, 0);
|
|
14981
15078
|
if (i === imgTileLength_1 + 1) {
|
|
@@ -15082,11 +15179,10 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15082
15179
|
var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
|
|
15083
15180
|
var svgData;
|
|
15084
15181
|
var exportElement = _this.control.svgObject.cloneNode(true);
|
|
15085
|
-
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
15086
15182
|
var backgroundElement = exportElement.childNodes[0];
|
|
15087
15183
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
15088
|
-
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
15089
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
15184
|
+
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
15185
|
+
|| _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
15090
15186
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
15091
15187
|
}
|
|
15092
15188
|
var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
@@ -15115,7 +15211,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15115
15211
|
image.src = url;
|
|
15116
15212
|
}
|
|
15117
15213
|
else {
|
|
15118
|
-
var
|
|
15214
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
15215
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
15216
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
15119
15217
|
var xHttp = new XMLHttpRequest();
|
|
15120
15218
|
var tileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
15121
15219
|
var _loop_1 = function (i) {
|
|
@@ -15134,16 +15232,16 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15134
15232
|
if (i === 0 || i === tileLength_1 + 1) {
|
|
15135
15233
|
if (i === 0) {
|
|
15136
15234
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
15137
|
-
ctx.rect(0,
|
|
15235
|
+
ctx.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
15138
15236
|
ctx.clip();
|
|
15139
15237
|
}
|
|
15140
15238
|
else {
|
|
15141
|
-
ctx.setTransform(1, 0, 0, 1,
|
|
15239
|
+
ctx.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
15142
15240
|
}
|
|
15143
15241
|
}
|
|
15144
15242
|
else {
|
|
15145
|
-
|
|
15146
|
-
|
|
15243
|
+
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
15244
|
+
ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) + top_1);
|
|
15147
15245
|
}
|
|
15148
15246
|
ctx.drawImage(tileImg, 0, 0);
|
|
15149
15247
|
if (i === tileLength_1 + 1) {
|