@syncfusion/ej2-maps 20.4.44 → 20.4.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/dist/ej2-maps.min.js +2 -2
- 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 +11 -9
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +11 -9
- 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/maps.js +8 -7
- package/src/maps/user-interaction/zoom.js +1 -0
- package/src/maps/utils/helper.js +2 -2
|
@@ -1949,7 +1949,7 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1949
1949
|
center = mapObject.zoomSettings.shouldZoomInitially
|
|
1950
1950
|
&& mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
|
|
1951
1951
|
mapObject.centerPosition;
|
|
1952
|
-
if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
|
|
1952
|
+
if (((!isNullOrUndefined(centerLongitude) && centerLongitude !== 0) && (!isNullOrUndefined(centerLatitude) && centerLatitude !== 0)) || checkMethodeZoom) {
|
|
1953
1953
|
const leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
|
|
1954
1954
|
const topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
|
|
1955
1955
|
const point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
|
|
@@ -2133,7 +2133,7 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2133
2133
|
const factor = animate ? 1 : mapObject.mapScaleValue;
|
|
2134
2134
|
const mapWidth = Math.abs(max['x'] - min['x']);
|
|
2135
2135
|
const mapHeight = Math.abs(min['y'] - max['y']);
|
|
2136
|
-
if ((!isNullOrUndefined(longitude) && !isNullOrUndefined(latitude)) || checkZoomMethod) {
|
|
2136
|
+
if (((!isNullOrUndefined(longitude) && longitude !== 0) && (!isNullOrUndefined(latitude) && latitude !== 0)) || checkZoomMethod) {
|
|
2137
2137
|
const topPosition = ((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) / factor;
|
|
2138
2138
|
const leftPosition = ((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) / factor;
|
|
2139
2139
|
const point = checkZoomMethod ? calculateCenterFromPixel(mapObject, layer) :
|
|
@@ -7545,33 +7545,33 @@ let Maps = class Maps extends Component {
|
|
|
7545
7545
|
let bottom;
|
|
7546
7546
|
let top;
|
|
7547
7547
|
let left;
|
|
7548
|
-
left = parseFloat(tileElement.style.left)
|
|
7548
|
+
left = parseFloat(tileElement.style.left);
|
|
7549
7549
|
const titleTextSize = measureText(this.titleSettings.text, this.titleSettings.textStyle);
|
|
7550
7550
|
const subTitleTextSize = measureText(this.titleSettings.subtitleSettings.text, this.titleSettings.subtitleSettings.textStyle);
|
|
7551
7551
|
if (this.isTileMap && this.isTileMapSubLayer && this.legendSettings.position === 'Bottom' && this.legendSettings.visible) {
|
|
7552
7552
|
if (this.legendSettings.mode !== 'Default') {
|
|
7553
7553
|
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
7554
|
-
top = parseFloat(tileElement.style.top) +
|
|
7554
|
+
top = parseFloat(tileElement.style.top) + (subTitleTextSize.height / 2)
|
|
7555
7555
|
- (this.legendModule.legendBorderRect.height / 2);
|
|
7556
7556
|
}
|
|
7557
7557
|
else {
|
|
7558
|
-
top = parseFloat(tileElement.style.top)
|
|
7558
|
+
top = parseFloat(tileElement.style.top) - this.mapAreaRect.y;
|
|
7559
7559
|
}
|
|
7560
7560
|
}
|
|
7561
7561
|
else {
|
|
7562
7562
|
left = this.legendModule.legendBorderRect.x;
|
|
7563
7563
|
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
7564
|
-
top = parseFloat(tileElement.style.top) +
|
|
7564
|
+
top = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2)
|
|
7565
7565
|
- this.legendModule.legendBorderRect.y;
|
|
7566
7566
|
}
|
|
7567
7567
|
else {
|
|
7568
|
-
top = parseFloat(tileElement.style.top) +
|
|
7568
|
+
top = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2);
|
|
7569
7569
|
}
|
|
7570
7570
|
}
|
|
7571
7571
|
}
|
|
7572
7572
|
else {
|
|
7573
7573
|
bottom = svg.bottom - tile.bottom - element.offsetTop;
|
|
7574
|
-
top = parseFloat(tileElement.style.top)
|
|
7574
|
+
top = parseFloat(tileElement.style.top);
|
|
7575
7575
|
}
|
|
7576
7576
|
top = (bottom <= 11) ? top : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top * 2);
|
|
7577
7577
|
left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
|
|
@@ -7591,6 +7591,7 @@ let Maps = class Maps extends Component {
|
|
|
7591
7591
|
}
|
|
7592
7592
|
}
|
|
7593
7593
|
this.element.style.outline = 'none';
|
|
7594
|
+
this.element.style.position = 'relative';
|
|
7594
7595
|
for (let i = 0; i < document.getElementsByTagName('path').length - 1; i++) {
|
|
7595
7596
|
if (document.getElementsByTagName('path')[i].id.indexOf('shapeIndex') > -1) {
|
|
7596
7597
|
document.getElementsByTagName('path')[i].style.outline = 'none';
|
|
@@ -7768,7 +7769,7 @@ let Maps = class Maps extends Component {
|
|
|
7768
7769
|
const secondaryElement = createElement('div', {
|
|
7769
7770
|
id: this.element.id + '_Secondary_Element'
|
|
7770
7771
|
});
|
|
7771
|
-
secondaryElement.style.cssText = 'position:
|
|
7772
|
+
secondaryElement.style.cssText = 'position: relative;z-index:2;';
|
|
7772
7773
|
this.element.appendChild(secondaryElement);
|
|
7773
7774
|
}
|
|
7774
7775
|
}
|
|
@@ -14197,6 +14198,7 @@ class Zoom {
|
|
|
14197
14198
|
const datalabelTemplateElemement = getElementByID(maps.element.id + '_LayerIndex_'
|
|
14198
14199
|
+ i + '_Label_Template_Group');
|
|
14199
14200
|
if ((!isNullOrUndefined(markerTemplateElement)) && markerTemplateElement.childElementCount > 0) {
|
|
14201
|
+
markerTemplateElement.style.visibility = "visible";
|
|
14200
14202
|
for (let k = 0; k < markerTemplateElement.childElementCount; k++) {
|
|
14201
14203
|
this.markerTranslate(markerTemplateElement.childNodes[k], factor, x, y, scale, 'Template');
|
|
14202
14204
|
}
|