@syncfusion/ej2-maps 20.4.38 → 20.4.42
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 +2 -0
- package/README.md +1 -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 +45 -20
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +45 -20
- 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 +13 -13
- package/src/maps/layers/legend.d.ts +1 -0
- package/src/maps/layers/legend.js +42 -18
- package/src/maps/maps.js +1 -1
- package/src/maps/user-interaction/zoom.js +2 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.42
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-maps@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-maps@
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@20.4.40",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-eWo9hwnlfL2NQorrZzBYBLlCWSt4mTtJHcdWaWPrZeUdTMBJZesqveTtSgQ5ylrI36KMpEII7xxW+mp2pzR6tA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-maps",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-maps",
|
|
24
24
|
"/@syncfusion/ej2-vue-maps"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.4.40.tgz",
|
|
27
|
+
"_shasum": "6a7dffaa6f210641f7ef3f43b522515150f45a6e",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.4.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.4.
|
|
40
|
-
"@syncfusion/ej2-compression": "~20.4.
|
|
41
|
-
"@syncfusion/ej2-data": "~20.4.
|
|
42
|
-
"@syncfusion/ej2-file-utils": "~20.4.
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~20.4.
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~20.4.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.4.42",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.4.42",
|
|
40
|
+
"@syncfusion/ej2-compression": "~20.4.42",
|
|
41
|
+
"@syncfusion/ej2-data": "~20.4.42",
|
|
42
|
+
"@syncfusion/ej2-file-utils": "~20.4.42",
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~20.4.42",
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~20.4.42"
|
|
45
45
|
},
|
|
46
46
|
"deprecated": false,
|
|
47
47
|
"description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
|
|
48
48
|
"devDependencies": {},
|
|
49
49
|
"es2015": "./dist/es6/ej2-maps.es5.js",
|
|
50
|
-
"homepage": "https://
|
|
50
|
+
"homepage": "https://www.syncfusion.com/javascript-ui-controls",
|
|
51
51
|
"keywords": [
|
|
52
52
|
"ej2",
|
|
53
53
|
"syncfusion",
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
94
94
|
},
|
|
95
95
|
"typings": "index.d.ts",
|
|
96
|
-
"version": "20.4.
|
|
96
|
+
"version": "20.4.42",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
|
@@ -143,6 +143,7 @@ export declare class Legend {
|
|
|
143
143
|
private removeCollections;
|
|
144
144
|
removeEventListener(): void;
|
|
145
145
|
private getLegendData;
|
|
146
|
+
private setToggleAttributes;
|
|
146
147
|
legendGradientColor(colorMap: ColorMappingSettings, legendIndex: number): string;
|
|
147
148
|
/**
|
|
148
149
|
* Get module name.
|
|
@@ -1812,12 +1812,13 @@ var Legend = /** @class */ (function () {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
if (targetEle !== null) {
|
|
1814
1814
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1815
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
1816
|
-
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
1817
|
-
legendShapeId.setAttribute('stroke', '#E5E5E5');
|
|
1818
|
-
}
|
|
1819
1815
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1820
|
-
|
|
1816
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
1817
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1818
|
+
}
|
|
1819
|
+
else {
|
|
1820
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
1821
|
+
}
|
|
1821
1822
|
}
|
|
1822
1823
|
}
|
|
1823
1824
|
else {
|
|
@@ -1829,12 +1830,11 @@ var Legend = /** @class */ (function () {
|
|
|
1829
1830
|
}
|
|
1830
1831
|
if (targetEle !== null) {
|
|
1831
1832
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1832
|
-
|
|
1833
|
+
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1834
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
1833
1835
|
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
1834
1836
|
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
|
|
1835
1837
|
}
|
|
1836
|
-
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1837
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
@@ -1881,9 +1881,13 @@ var Legend = /** @class */ (function () {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
if (targetEle !== null) {
|
|
1883
1883
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1884
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
1885
1884
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1886
|
-
|
|
1885
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
1886
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1887
|
+
}
|
|
1888
|
+
else {
|
|
1889
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ? this.maps.layers[j].shapeSettings.opacity : this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
1890
|
+
}
|
|
1887
1891
|
}
|
|
1888
1892
|
}
|
|
1889
1893
|
else {
|
|
@@ -1902,9 +1906,8 @@ var Legend = /** @class */ (function () {
|
|
|
1902
1906
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
1903
1907
|
if (targetEle !== null) {
|
|
1904
1908
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1905
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
1906
1909
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1907
|
-
legendShapeId.
|
|
1910
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
1908
1911
|
}
|
|
1909
1912
|
}
|
|
1910
1913
|
}
|
|
@@ -1956,9 +1959,13 @@ var Legend = /** @class */ (function () {
|
|
|
1956
1959
|
}
|
|
1957
1960
|
if (targetEle !== null) {
|
|
1958
1961
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
1959
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
1960
1962
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
1961
|
-
|
|
1963
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
1964
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1965
|
+
}
|
|
1966
|
+
else {
|
|
1967
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width), (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
1968
|
+
}
|
|
1962
1969
|
}
|
|
1963
1970
|
}
|
|
1964
1971
|
else {
|
|
@@ -1971,6 +1978,10 @@ var Legend = /** @class */ (function () {
|
|
|
1971
1978
|
if (targetEle !== null) {
|
|
1972
1979
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
1973
1980
|
legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
1981
|
+
legendShapeId.setAttribute('fill-opacity', this.legendCollection[legendIndex]['opacity']);
|
|
1982
|
+
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['shapeBorder']['color']);
|
|
1983
|
+
legendShapeId.setAttribute('stroke-width', this.legendCollection[legendIndex]['shapeBorder']['width']);
|
|
1984
|
+
legendShapeId.setAttribute('stroke-opacity', this.legendCollection[legendIndex]['shapeBorder']['opacity']);
|
|
1974
1985
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
1975
1986
|
legendTextId.setAttribute('fill', '#757575');
|
|
1976
1987
|
}
|
|
@@ -2019,9 +2030,13 @@ var Legend = /** @class */ (function () {
|
|
|
2019
2030
|
}
|
|
2020
2031
|
if (targetEle !== null) {
|
|
2021
2032
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
2022
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
2023
2033
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
2024
|
-
|
|
2034
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
2035
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
2036
|
+
}
|
|
2037
|
+
else {
|
|
2038
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
2039
|
+
}
|
|
2025
2040
|
}
|
|
2026
2041
|
}
|
|
2027
2042
|
else {
|
|
@@ -2041,9 +2056,8 @@ var Legend = /** @class */ (function () {
|
|
|
2041
2056
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
2042
2057
|
if (targetEle !== null) {
|
|
2043
2058
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
2044
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
2045
2059
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
2046
|
-
legendShapeId.
|
|
2060
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
2047
2061
|
}
|
|
2048
2062
|
}
|
|
2049
2063
|
}
|
|
@@ -2120,6 +2134,16 @@ var Legend = /** @class */ (function () {
|
|
|
2120
2134
|
}
|
|
2121
2135
|
return legendData;
|
|
2122
2136
|
};
|
|
2137
|
+
Legend.prototype.setToggleAttributes = function (textElement, shapeElement, fillColor, fillOpacity, borderColor, borderWidth, borderOpacity, textColor) {
|
|
2138
|
+
textElement.setAttribute('fill', textColor);
|
|
2139
|
+
shapeElement.setAttribute('fill', fillColor);
|
|
2140
|
+
shapeElement.setAttribute('fill-opacity', (fillOpacity).toString());
|
|
2141
|
+
shapeElement.setAttribute('stroke', borderColor);
|
|
2142
|
+
shapeElement.setAttribute('stroke-width', (borderWidth).toString());
|
|
2143
|
+
if (!isNullOrUndefined(borderOpacity)) {
|
|
2144
|
+
shapeElement.setAttribute('stroke-opacity', (borderOpacity).toString());
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
2123
2147
|
Legend.prototype.legendGradientColor = function (colorMap, legendIndex) {
|
|
2124
2148
|
var legendFillColor;
|
|
2125
2149
|
var xmlns = 'http://www.w3.org/2000/svg';
|
package/src/maps/maps.js
CHANGED
|
@@ -1154,7 +1154,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1154
1154
|
};
|
|
1155
1155
|
Maps.prototype.removeTileMap = function () {
|
|
1156
1156
|
var animateElement = document.getElementById(this.element.id + '_animated_tiles');
|
|
1157
|
-
if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount
|
|
1157
|
+
if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount < this.currentTiles.childElementCount) {
|
|
1158
1158
|
for (var l = animateElement.childElementCount - 1; l >= this.currentTiles.childElementCount; l--) {
|
|
1159
1159
|
animateElement.removeChild(animateElement.children[l]);
|
|
1160
1160
|
}
|
|
@@ -405,7 +405,8 @@ var Zoom = /** @class */ (function () {
|
|
|
405
405
|
this.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
406
406
|
this.currentLayer = maps.layersCollection[this.index];
|
|
407
407
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
408
|
-
|
|
408
|
+
var elementCount = layerElement.childElementCount;
|
|
409
|
+
for (var j = 0; j < elementCount; j++) {
|
|
409
410
|
var currentEle = layerElement.childNodes[j];
|
|
410
411
|
if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
|
|
411
412
|
&& (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
|