@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
|
@@ -1204,7 +1204,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1204
1204
|
*/
|
|
1205
1205
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1206
1206
|
function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1207
|
-
templateFn = getTemplateFunction(eventArgs.template);
|
|
1207
|
+
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1208
1208
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
1209
1209
|
const templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
|
|
1210
1210
|
const markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
|
|
@@ -2236,7 +2236,7 @@ function Internalize(maps, value) {
|
|
|
2236
2236
|
* @private
|
|
2237
2237
|
*/
|
|
2238
2238
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2239
|
-
function getTemplateFunction(template) {
|
|
2239
|
+
function getTemplateFunction(template, maps) {
|
|
2240
2240
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2241
2241
|
let templateFn = null;
|
|
2242
2242
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2244,6 +2244,9 @@ function getTemplateFunction(template) {
|
|
|
2244
2244
|
if (document.querySelectorAll(template).length) {
|
|
2245
2245
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2246
2246
|
}
|
|
2247
|
+
else if (maps.isVue || maps.isVue3) {
|
|
2248
|
+
templateFn = compile(template);
|
|
2249
|
+
}
|
|
2247
2250
|
}
|
|
2248
2251
|
catch (e) {
|
|
2249
2252
|
templateFn = compile(template);
|
|
@@ -2646,6 +2649,7 @@ function createTooltip(id, text, top, left, fontSize) {
|
|
|
2646
2649
|
'left:' + left.toString() + 'px;' +
|
|
2647
2650
|
'color: #000000; ' +
|
|
2648
2651
|
'background:' + '#FFFFFF' + ';' +
|
|
2652
|
+
'z-index: 2;' +
|
|
2649
2653
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2650
2654
|
if (!tooltip) {
|
|
2651
2655
|
tooltip = createElement('div', {
|
|
@@ -2846,6 +2850,9 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2846
2850
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2847
2851
|
}
|
|
2848
2852
|
}
|
|
2853
|
+
else {
|
|
2854
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2855
|
+
}
|
|
2849
2856
|
}
|
|
2850
2857
|
else {
|
|
2851
2858
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
@@ -3372,11 +3379,11 @@ function getShapeColor(theme) {
|
|
|
3372
3379
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3373
3380
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3374
3381
|
break;
|
|
3375
|
-
case '
|
|
3382
|
+
case 'fluent':
|
|
3376
3383
|
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3377
3384
|
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3378
3385
|
break;
|
|
3379
|
-
case '
|
|
3386
|
+
case 'fluentdark':
|
|
3380
3387
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3381
3388
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3382
3389
|
break;
|
|
@@ -3665,7 +3672,7 @@ function getThemeStyle(theme) {
|
|
|
3665
3672
|
shapeFill: '#495057'
|
|
3666
3673
|
};
|
|
3667
3674
|
break;
|
|
3668
|
-
case '
|
|
3675
|
+
case 'fluent':
|
|
3669
3676
|
style = {
|
|
3670
3677
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3671
3678
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -3688,7 +3695,7 @@ function getThemeStyle(theme) {
|
|
|
3688
3695
|
shapeFill: '#F3F2F1'
|
|
3689
3696
|
};
|
|
3690
3697
|
break;
|
|
3691
|
-
case '
|
|
3698
|
+
case 'fluentdark':
|
|
3692
3699
|
style = {
|
|
3693
3700
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3694
3701
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -4657,10 +4664,10 @@ class Marker {
|
|
|
4657
4664
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4658
4665
|
const lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4659
4666
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4660
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) :
|
|
4667
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
|
|
4661
4668
|
const lat = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
4662
4669
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
4663
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) :
|
|
4670
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
|
|
4664
4671
|
const offset = markerSettings.offset;
|
|
4665
4672
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
|
|
4666
4673
|
const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -4705,7 +4712,7 @@ class Marker {
|
|
|
4705
4712
|
this.maps.renderReactTemplates();
|
|
4706
4713
|
}
|
|
4707
4714
|
}
|
|
4708
|
-
if (markerTemplateEle.childElementCount === (
|
|
4715
|
+
if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
|
|
4709
4716
|
getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
|
|
4710
4717
|
if (this.maps.checkInitialRender) {
|
|
4711
4718
|
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
@@ -4955,7 +4962,7 @@ class Marker {
|
|
|
4955
4962
|
if ((target.indexOf('_cluster_') > -1)) {
|
|
4956
4963
|
let isClusterSame = false;
|
|
4957
4964
|
const clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
|
|
4958
|
-
const indexes = clusterElement.innerHTML.split(',').map(Number);
|
|
4965
|
+
const indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
|
|
4959
4966
|
collection = [];
|
|
4960
4967
|
for (const i of indexes) {
|
|
4961
4968
|
collection.push({ data: marker$$1.dataSource[i], index: i });
|
|
@@ -6789,7 +6796,7 @@ class Annotations {
|
|
|
6789
6796
|
if (argsData.cancel) {
|
|
6790
6797
|
return;
|
|
6791
6798
|
}
|
|
6792
|
-
templateFn = getTemplateFunction(argsData.content);
|
|
6799
|
+
templateFn = getTemplateFunction(argsData.content, this.map);
|
|
6793
6800
|
if (templateFn && templateFn(this.map, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex).length) {
|
|
6794
6801
|
templateElement = Array.prototype.slice.call(templateFn(this.map, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex));
|
|
6795
6802
|
const length = templateElement.length;
|
|
@@ -6901,6 +6908,10 @@ let Maps = class Maps extends Component {
|
|
|
6901
6908
|
* Resize the map
|
|
6902
6909
|
*/
|
|
6903
6910
|
this.isResize = false;
|
|
6911
|
+
/**
|
|
6912
|
+
* @private
|
|
6913
|
+
*/
|
|
6914
|
+
this.isReset = false;
|
|
6904
6915
|
/** @private */
|
|
6905
6916
|
this.baseSize = new Size(0, 0);
|
|
6906
6917
|
/** @public */
|
|
@@ -8550,7 +8561,10 @@ let Maps = class Maps extends Component {
|
|
|
8550
8561
|
if (!isNullOrUndefined(newProp.layers[x])) {
|
|
8551
8562
|
const collection = Object.keys(newProp.layers[x]);
|
|
8552
8563
|
for (const collectionProp of collection) {
|
|
8553
|
-
if (collectionProp === '
|
|
8564
|
+
if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
|
|
8565
|
+
this.isReset = true;
|
|
8566
|
+
}
|
|
8567
|
+
else if (collectionProp === 'markerSettings') {
|
|
8554
8568
|
isMarker = true;
|
|
8555
8569
|
}
|
|
8556
8570
|
else if (collectionProp === 'staticMapType') {
|
|
@@ -9636,7 +9650,7 @@ class DataLabel {
|
|
|
9636
9650
|
this.value[index] = { rightWidth: xpositionEnds, leftWidth: xpositionStart, heightTop: start, heightBottom: end };
|
|
9637
9651
|
let labelElement;
|
|
9638
9652
|
if (eventargs.template !== '') {
|
|
9639
|
-
templateFn = getTemplateFunction(eventargs.template);
|
|
9653
|
+
templateFn = getTemplateFunction(eventargs.template, this.maps);
|
|
9640
9654
|
const templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
|
|
9641
9655
|
datasrcObj : shapeData['properties'], this.maps, eventargs.template, this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
9642
9656
|
templateElement.innerHTML = !templateFn ? eventargs.template : '';
|
|
@@ -11243,7 +11257,7 @@ class Legend {
|
|
|
11243
11257
|
data[this.maps.legendSettings.showLegendPath];
|
|
11244
11258
|
if (marker$$1.visible && showLegend && (!isNullOrUndefined(data['latitude'])) && (!isNullOrUndefined(data['longitude']))) {
|
|
11245
11259
|
if (marker$$1.template) {
|
|
11246
|
-
templateFn = getTemplateFunction(marker$$1.template);
|
|
11260
|
+
templateFn = getTemplateFunction(marker$$1.template, this.maps);
|
|
11247
11261
|
const templateElement = templateFn(this.maps);
|
|
11248
11262
|
const markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
11249
11263
|
templateElement;
|
|
@@ -12716,6 +12730,10 @@ class MapsTooltip {
|
|
|
12716
12730
|
fill: tooltipArgs.fill || this.maps.themeStyle.tooltipFillColor
|
|
12717
12731
|
});
|
|
12718
12732
|
}
|
|
12733
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12734
|
+
if (this.maps.isVue || this.maps.isVue3) {
|
|
12735
|
+
this.svgTooltip.controlInstance = this.maps;
|
|
12736
|
+
}
|
|
12719
12737
|
this.svgTooltip.opacity = this.maps.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
|
|
12720
12738
|
this.svgTooltip.appendTo(tooltipEle);
|
|
12721
12739
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -12729,9 +12747,7 @@ class MapsTooltip {
|
|
|
12729
12747
|
}
|
|
12730
12748
|
}
|
|
12731
12749
|
else {
|
|
12732
|
-
this.
|
|
12733
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12734
|
-
this.maps.clearTemplate();
|
|
12750
|
+
this.clearTooltip();
|
|
12735
12751
|
}
|
|
12736
12752
|
});
|
|
12737
12753
|
if (this.svgTooltip) {
|
|
@@ -12746,9 +12762,7 @@ class MapsTooltip {
|
|
|
12746
12762
|
});
|
|
12747
12763
|
}
|
|
12748
12764
|
else {
|
|
12749
|
-
this.
|
|
12750
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12751
|
-
this.maps.clearTemplate();
|
|
12765
|
+
this.clearTooltip();
|
|
12752
12766
|
}
|
|
12753
12767
|
}
|
|
12754
12768
|
else {
|
|
@@ -12758,9 +12772,7 @@ class MapsTooltip {
|
|
|
12758
12772
|
this.maps.notify(click, this);
|
|
12759
12773
|
}
|
|
12760
12774
|
else {
|
|
12761
|
-
this.
|
|
12762
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12763
|
-
this.maps.clearTemplate();
|
|
12775
|
+
this.clearTooltip();
|
|
12764
12776
|
}
|
|
12765
12777
|
}
|
|
12766
12778
|
}
|
|
@@ -12804,8 +12816,18 @@ class MapsTooltip {
|
|
|
12804
12816
|
}
|
|
12805
12817
|
}
|
|
12806
12818
|
removeTooltip() {
|
|
12819
|
+
let isTooltipRemoved = false;
|
|
12807
12820
|
if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
|
|
12808
12821
|
remove(document.getElementsByClassName('EJ2-maps-Tooltip')[0]);
|
|
12822
|
+
isTooltipRemoved = true;
|
|
12823
|
+
}
|
|
12824
|
+
return isTooltipRemoved;
|
|
12825
|
+
}
|
|
12826
|
+
clearTooltip() {
|
|
12827
|
+
const isTooltipRemoved = this.removeTooltip();
|
|
12828
|
+
if (isTooltipRemoved) {
|
|
12829
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12830
|
+
this.maps.clearTemplate();
|
|
12809
12831
|
}
|
|
12810
12832
|
}
|
|
12811
12833
|
// eslint-disable-next-line valid-jsdoc
|
|
@@ -12937,8 +12959,13 @@ class Zoom {
|
|
|
12937
12959
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
12938
12960
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
12939
12961
|
map.scale = newZoomFactor;
|
|
12940
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
12941
|
-
|
|
12962
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
12963
|
+
map.translatePoint = map.previousPoint;
|
|
12964
|
+
map.scale = map.previousScale;
|
|
12965
|
+
}
|
|
12966
|
+
else {
|
|
12967
|
+
this.applyTransform();
|
|
12968
|
+
}
|
|
12942
12969
|
}
|
|
12943
12970
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
12944
12971
|
this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
|
|
@@ -12955,31 +12982,38 @@ class Zoom {
|
|
|
12955
12982
|
}
|
|
12956
12983
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
12957
12984
|
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
12958
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
12985
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
12986
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
12987
|
+
map.scale = map.previousScale;
|
|
12988
|
+
map.tileZoomLevel = prevLevel;
|
|
12989
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
12964
12990
|
}
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
setTimeout(() => {
|
|
12970
|
-
// if (type === 'ZoomOut') {
|
|
12971
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
12972
|
-
// if (element1.childElementCount) {
|
|
12973
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
12974
|
-
// } else {
|
|
12975
|
-
// element1 = element1;
|
|
12976
|
-
// }
|
|
12977
|
-
// }
|
|
12978
|
-
this.applyTransform();
|
|
12991
|
+
else {
|
|
12992
|
+
if (document.querySelector('.GroupElement')) {
|
|
12993
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
12994
|
+
}
|
|
12979
12995
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
12980
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = '
|
|
12996
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
12981
12997
|
}
|
|
12982
|
-
|
|
12998
|
+
this.markerLineAnimation(map);
|
|
12999
|
+
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
13000
|
+
const element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13001
|
+
const animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13002
|
+
setTimeout(() => {
|
|
13003
|
+
// if (type === 'ZoomOut') {
|
|
13004
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13005
|
+
// if (element1.childElementCount) {
|
|
13006
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13007
|
+
// } else {
|
|
13008
|
+
// element1 = element1;
|
|
13009
|
+
// }
|
|
13010
|
+
// }
|
|
13011
|
+
this.applyTransform();
|
|
13012
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13013
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13014
|
+
}
|
|
13015
|
+
}, animationDuration);
|
|
13016
|
+
}
|
|
12983
13017
|
}
|
|
12984
13018
|
this.maps.zoomNotApplied = false;
|
|
12985
13019
|
}
|
|
@@ -13001,6 +13035,7 @@ class Zoom {
|
|
|
13001
13035
|
};
|
|
13002
13036
|
}
|
|
13003
13037
|
map.trigger('zoom', zoomArgs);
|
|
13038
|
+
return zoomArgs.cancel;
|
|
13004
13039
|
}
|
|
13005
13040
|
getTileTranslatePosition(prevLevel, currentLevel, position, type) {
|
|
13006
13041
|
const map = this.maps;
|
|
@@ -13026,6 +13061,7 @@ class Zoom {
|
|
|
13026
13061
|
const zoomRect = this.zoomingRect;
|
|
13027
13062
|
const maxZoom = map.zoomSettings.maxZoom;
|
|
13028
13063
|
const minZoom = map.zoomSettings.minZoom;
|
|
13064
|
+
let isZoomCancelled;
|
|
13029
13065
|
if (zoomRect.height > 0 && zoomRect.width > 0) {
|
|
13030
13066
|
const x = this.zoomingRect.x + (this.zoomingRect.width / 2);
|
|
13031
13067
|
const y = this.zoomingRect.y + (this.zoomingRect.height / 2);
|
|
@@ -13038,7 +13074,11 @@ class Zoom {
|
|
|
13038
13074
|
const translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
13039
13075
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13040
13076
|
map.scale = zoomCalculationFactor;
|
|
13041
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13077
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13078
|
+
if (isZoomCancelled) {
|
|
13079
|
+
map.translatePoint = map.previousPoint;
|
|
13080
|
+
map.scale = map.previousScale;
|
|
13081
|
+
}
|
|
13042
13082
|
}
|
|
13043
13083
|
else {
|
|
13044
13084
|
zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
|
|
@@ -13051,13 +13091,21 @@ class Zoom {
|
|
|
13051
13091
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
|
|
13052
13092
|
(Math.pow(2, zoomCalculationFactor));
|
|
13053
13093
|
map.scale = (Math.pow(2, zoomCalculationFactor));
|
|
13054
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13055
|
-
|
|
13094
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13095
|
+
if (isZoomCancelled) {
|
|
13096
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13097
|
+
map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
|
|
13098
|
+
}
|
|
13099
|
+
else {
|
|
13100
|
+
map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
|
|
13101
|
+
}
|
|
13102
|
+
}
|
|
13103
|
+
if (!isZoomCancelled) {
|
|
13104
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
13105
|
+
this.applyTransform(true);
|
|
13106
|
+
this.maps.zoomNotApplied = false;
|
|
13107
|
+
this.zoomingRect = null;
|
|
13056
13108
|
}
|
|
13057
|
-
map.mapScaleValue = zoomCalculationFactor;
|
|
13058
|
-
this.applyTransform(true);
|
|
13059
|
-
this.maps.zoomNotApplied = false;
|
|
13060
|
-
this.zoomingRect = null;
|
|
13061
13109
|
}
|
|
13062
13110
|
}
|
|
13063
13111
|
setInteraction(newInteraction) {
|
|
@@ -13086,6 +13134,7 @@ class Zoom {
|
|
|
13086
13134
|
this.pinchFactor *= newScale;
|
|
13087
13135
|
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
13088
13136
|
const zoomCalculationFactor = this.pinchFactor;
|
|
13137
|
+
let isZoomCancelled;
|
|
13089
13138
|
if (!map.isTileMap) {
|
|
13090
13139
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13091
13140
|
const minBounds = map.baseMapRectBounds['min'];
|
|
@@ -13101,7 +13150,11 @@ class Zoom {
|
|
|
13101
13150
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
13102
13151
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13103
13152
|
map.scale = zoomCalculationFactor;
|
|
13104
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13153
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13154
|
+
if (isZoomCancelled) {
|
|
13155
|
+
map.translatePoint = map.previousPoint;
|
|
13156
|
+
map.scale = map.previousScale;
|
|
13157
|
+
}
|
|
13105
13158
|
}
|
|
13106
13159
|
else {
|
|
13107
13160
|
const newTileFactor = zoomCalculationFactor;
|
|
@@ -13112,10 +13165,20 @@ class Zoom {
|
|
|
13112
13165
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
|
|
13113
13166
|
(Math.pow(2, newTileFactor));
|
|
13114
13167
|
map.scale = (Math.pow(2, newTileFactor));
|
|
13115
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13116
|
-
|
|
13168
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13169
|
+
if (isZoomCancelled) {
|
|
13170
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13171
|
+
map.scale = map.previousScale;
|
|
13172
|
+
map.tileZoomLevel = prevLevel;
|
|
13173
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13174
|
+
}
|
|
13175
|
+
else {
|
|
13176
|
+
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
13177
|
+
}
|
|
13178
|
+
}
|
|
13179
|
+
if (!isZoomCancelled) {
|
|
13180
|
+
this.applyTransform();
|
|
13117
13181
|
}
|
|
13118
|
-
this.applyTransform();
|
|
13119
13182
|
}
|
|
13120
13183
|
drawZoomRectangle() {
|
|
13121
13184
|
const map = this.maps;
|
|
@@ -13392,10 +13455,10 @@ class Zoom {
|
|
|
13392
13455
|
}
|
|
13393
13456
|
const lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
13394
13457
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
13395
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] :
|
|
13458
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
|
|
13396
13459
|
const long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
13397
13460
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
13398
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] :
|
|
13461
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
|
|
13399
13462
|
const offset = markerSettings.offset;
|
|
13400
13463
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
|
|
13401
13464
|
const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -13415,10 +13478,10 @@ class Zoom {
|
|
|
13415
13478
|
nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
|
|
13416
13479
|
markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13417
13480
|
markerCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13418
|
-
this.maps.markerNullCount = (
|
|
13419
|
-
? this.maps.markerNullCount : this.maps.markerNullCount
|
|
13481
|
+
this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
13482
|
+
? this.maps.markerNullCount + 1 : this.maps.markerNullCount;
|
|
13420
13483
|
const markerDataLength = markerDatas.length - this.maps.markerNullCount;
|
|
13421
|
-
if (markerSVGObject.childElementCount === (
|
|
13484
|
+
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
13422
13485
|
layerElement.appendChild(markerSVGObject);
|
|
13423
13486
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
13424
13487
|
this.maps.svgObject.appendChild(markerSVGObject);
|
|
@@ -13426,7 +13489,7 @@ class Zoom {
|
|
|
13426
13489
|
clusterTemplate(currentLayers, markerSVGObject, this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
13427
13490
|
}
|
|
13428
13491
|
}
|
|
13429
|
-
if (markerTemplateElements.childElementCount === (
|
|
13492
|
+
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
|
|
13430
13493
|
getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
13431
13494
|
if (scale >= 1) {
|
|
13432
13495
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
@@ -13821,8 +13884,13 @@ class Zoom {
|
|
|
13821
13884
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13822
13885
|
map.zoomTranslatePoint = map.translatePoint;
|
|
13823
13886
|
map.scale = zoomFactor;
|
|
13824
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13825
|
-
|
|
13887
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13888
|
+
map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
|
|
13889
|
+
map.scale = map.previousScale;
|
|
13890
|
+
}
|
|
13891
|
+
else {
|
|
13892
|
+
this.applyTransform(true);
|
|
13893
|
+
}
|
|
13826
13894
|
}
|
|
13827
13895
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
13828
13896
|
let tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
@@ -13839,25 +13907,32 @@ class Zoom {
|
|
|
13839
13907
|
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
13840
13908
|
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
13841
13909
|
}
|
|
13842
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
}
|
|
13848
|
-
if (document.querySelector('.GroupElement')) {
|
|
13849
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
13910
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13911
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13912
|
+
map.scale = map.previousScale;
|
|
13913
|
+
map.tileZoomLevel = prevLevel;
|
|
13914
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13850
13915
|
}
|
|
13851
|
-
|
|
13852
|
-
|
|
13853
|
-
|
|
13854
|
-
const animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13855
|
-
setTimeout(() => {
|
|
13856
|
-
this.applyTransform(true);
|
|
13916
|
+
else {
|
|
13917
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13918
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13857
13919
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13858
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = '
|
|
13920
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13859
13921
|
}
|
|
13860
|
-
|
|
13922
|
+
if (document.querySelector('.GroupElement')) {
|
|
13923
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
13924
|
+
}
|
|
13925
|
+
this.markerLineAnimation(map);
|
|
13926
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
13927
|
+
const element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13928
|
+
const animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13929
|
+
setTimeout(() => {
|
|
13930
|
+
this.applyTransform(true);
|
|
13931
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13932
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13933
|
+
}
|
|
13934
|
+
}, animationDuration);
|
|
13935
|
+
}
|
|
13861
13936
|
}
|
|
13862
13937
|
this.maps.zoomNotApplied = false;
|
|
13863
13938
|
}
|
|
@@ -13866,7 +13941,7 @@ class Zoom {
|
|
|
13866
13941
|
const map = this.maps;
|
|
13867
13942
|
this.toolBarGroup = map.renderer.createGroup({
|
|
13868
13943
|
id: map.element.id + '_Zooming_KitCollection',
|
|
13869
|
-
opacity: map.theme.toLowerCase() === '
|
|
13944
|
+
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
13870
13945
|
});
|
|
13871
13946
|
const kitHeight = 16;
|
|
13872
13947
|
const kitWidth = 16;
|
|
@@ -14270,14 +14345,14 @@ class Zoom {
|
|
|
14270
14345
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14271
14346
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
14272
14347
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
14273
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14274
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14348
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14349
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14275
14350
|
}
|
|
14276
14351
|
}
|
|
14277
14352
|
}
|
|
14278
14353
|
}
|
|
14279
14354
|
else {
|
|
14280
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14355
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14281
14356
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14282
14357
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
14283
14358
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
|
@@ -14484,7 +14559,27 @@ class Print {
|
|
|
14484
14559
|
getHTMLContent(elements) {
|
|
14485
14560
|
const elementRect = getClientElement(this.control.element.id);
|
|
14486
14561
|
let div = createElement('div');
|
|
14487
|
-
|
|
14562
|
+
let divElement = this.control.element.cloneNode(true);
|
|
14563
|
+
if (this.control.isTileMap) {
|
|
14564
|
+
for (let i = 0; i < divElement.childElementCount; i++) {
|
|
14565
|
+
if (divElement.children[i].id === this.control.element.id + '_tile_parent') {
|
|
14566
|
+
divElement.children[i].style.removeProperty('height');
|
|
14567
|
+
divElement.children[i].style.removeProperty('width');
|
|
14568
|
+
divElement.children[i].style.removeProperty('top');
|
|
14569
|
+
divElement.children[i].style.removeProperty('left');
|
|
14570
|
+
divElement.children[i].style.removeProperty('right');
|
|
14571
|
+
divElement.children[i].style.removeProperty('overflow');
|
|
14572
|
+
const svgElement = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
|
|
14573
|
+
divElement.children[i].children[0].style.overflow = 'hidden';
|
|
14574
|
+
divElement.children[i].children[0].style.position = 'absolute';
|
|
14575
|
+
divElement.children[i].children[0].style.height = svgElement.style.height;
|
|
14576
|
+
divElement.children[i].children[0].style.width = svgElement.style.width;
|
|
14577
|
+
divElement.children[i].children[0].style.left = svgElement.style.left;
|
|
14578
|
+
divElement.children[i].children[0].style.top = svgElement.style.top;
|
|
14579
|
+
break;
|
|
14580
|
+
}
|
|
14581
|
+
}
|
|
14582
|
+
}
|
|
14488
14583
|
if (elements) {
|
|
14489
14584
|
if (elements instanceof Array) {
|
|
14490
14585
|
Array.prototype.forEach.call(elements, (value) => {
|
|
@@ -14499,7 +14594,7 @@ class Print {
|
|
|
14499
14594
|
}
|
|
14500
14595
|
}
|
|
14501
14596
|
else {
|
|
14502
|
-
div.appendChild(
|
|
14597
|
+
div.appendChild(divElement);
|
|
14503
14598
|
}
|
|
14504
14599
|
return div;
|
|
14505
14600
|
}
|
|
@@ -14562,7 +14657,6 @@ class ImageExport {
|
|
|
14562
14657
|
const isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
14563
14658
|
const toolbarEle = document.getElementById(this.control.element.id + '_ToolBar');
|
|
14564
14659
|
const svgParent = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
|
|
14565
|
-
const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
|
|
14566
14660
|
let svgDataElement;
|
|
14567
14661
|
let tileSvg;
|
|
14568
14662
|
let svgObject = getElementByID(this.control.element.id + '_svg').cloneNode(true);
|
|
@@ -14607,7 +14701,9 @@ class ImageExport {
|
|
|
14607
14701
|
image.src = url;
|
|
14608
14702
|
}
|
|
14609
14703
|
else {
|
|
14610
|
-
const
|
|
14704
|
+
const svgParentElement = document.getElementById(this.control.element.id + '_MapAreaBorder');
|
|
14705
|
+
let top = parseFloat(svgParentElement.getAttribute('y'));
|
|
14706
|
+
let left = parseFloat(svgParentElement.getAttribute('x'));
|
|
14611
14707
|
const imgxHttp = new XMLHttpRequest();
|
|
14612
14708
|
const imgTileLength = this.control.mapLayerPanel.tiles.length;
|
|
14613
14709
|
for (let i = 0; i <= imgTileLength + 1; i++) {
|
|
@@ -14626,16 +14722,17 @@ class ImageExport {
|
|
|
14626
14722
|
if (i === 0 || i === imgTileLength + 1) {
|
|
14627
14723
|
if (i === 0) {
|
|
14628
14724
|
ctxt.setTransform(1, 0, 0, 1, 0, 0);
|
|
14629
|
-
ctxt.rect(0,
|
|
14725
|
+
ctxt.rect(0, top, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
14630
14726
|
ctxt.clip();
|
|
14631
14727
|
}
|
|
14632
14728
|
else {
|
|
14633
|
-
ctxt.setTransform(1, 0, 0, 1,
|
|
14729
|
+
ctxt.setTransform(1, 0, 0, 1, left, top);
|
|
14634
14730
|
}
|
|
14635
14731
|
}
|
|
14636
14732
|
else {
|
|
14637
|
-
|
|
14638
|
-
|
|
14733
|
+
const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
|
|
14734
|
+
ctxt.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left, parseFloat(tile.style.top) +
|
|
14735
|
+
top);
|
|
14639
14736
|
}
|
|
14640
14737
|
ctxt.drawImage(exportTileImg, 0, 0);
|
|
14641
14738
|
if (i === imgTileLength + 1) {
|
|
@@ -14737,11 +14834,10 @@ class PdfExport {
|
|
|
14737
14834
|
const svgParent = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
|
|
14738
14835
|
let svgData;
|
|
14739
14836
|
const exportElement = this.control.svgObject.cloneNode(true);
|
|
14740
|
-
const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
|
|
14741
14837
|
const backgroundElement = exportElement.childNodes[0];
|
|
14742
14838
|
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
14743
|
-
if ((this.control.theme === 'Tailwind' || this.control.theme === 'TailwindDark' || this.control.theme === 'Bootstrap5' || this.control.theme === 'Bootstrap5Dark'
|
|
14744
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
14839
|
+
if ((this.control.theme === 'Tailwind' || this.control.theme === 'TailwindDark' || this.control.theme === 'Bootstrap5' || this.control.theme === 'Bootstrap5Dark'
|
|
14840
|
+
|| this.control.theme === 'Fluent' || this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
14745
14841
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
14746
14842
|
}
|
|
14747
14843
|
const url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
@@ -14770,7 +14866,9 @@ class PdfExport {
|
|
|
14770
14866
|
image.src = url;
|
|
14771
14867
|
}
|
|
14772
14868
|
else {
|
|
14773
|
-
const
|
|
14869
|
+
const svgParentElement = document.getElementById(this.control.element.id + '_MapAreaBorder');
|
|
14870
|
+
let top = parseFloat(svgParentElement.getAttribute('y'));
|
|
14871
|
+
let left = parseFloat(svgParentElement.getAttribute('x'));
|
|
14774
14872
|
const xHttp = new XMLHttpRequest();
|
|
14775
14873
|
const tileLength = this.control.mapLayerPanel.tiles.length;
|
|
14776
14874
|
for (let i = 0; i <= tileLength + 1; i++) {
|
|
@@ -14789,16 +14887,16 @@ class PdfExport {
|
|
|
14789
14887
|
if (i === 0 || i === tileLength + 1) {
|
|
14790
14888
|
if (i === 0) {
|
|
14791
14889
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
14792
|
-
ctx.rect(0,
|
|
14890
|
+
ctx.rect(0, top, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
14793
14891
|
ctx.clip();
|
|
14794
14892
|
}
|
|
14795
14893
|
else {
|
|
14796
|
-
ctx.setTransform(1, 0, 0, 1,
|
|
14894
|
+
ctx.setTransform(1, 0, 0, 1, left, top);
|
|
14797
14895
|
}
|
|
14798
14896
|
}
|
|
14799
14897
|
else {
|
|
14800
|
-
|
|
14801
|
-
|
|
14898
|
+
const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
|
|
14899
|
+
ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left, parseFloat(tile.style.top) + top);
|
|
14802
14900
|
}
|
|
14803
14901
|
ctx.drawImage(tileImg, 0, 0);
|
|
14804
14902
|
if (i === tileLength + 1) {
|