@syncfusion/ej2-maps 20.4.40 → 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/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 +30 -43
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +30 -43
- 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/legend.d.ts +1 -0
- package/src/maps/layers/legend.js +30 -43
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@20.4.
|
|
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-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.4.
|
|
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,13 +35,13 @@
|
|
|
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",
|
|
@@ -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.
|
|
@@ -1814,22 +1814,10 @@ var Legend = /** @class */ (function () {
|
|
|
1814
1814
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1815
1815
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1816
1816
|
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
1817
|
-
|
|
1818
|
-
legendShapeId.setAttribute('fill-opacity', (legendToggleOpacity).toString());
|
|
1819
|
-
legendShapeId.setAttribute('stroke', legendToggleBorderColor);
|
|
1820
|
-
legendShapeId.setAttribute('stroke-width', (legendToggleBorderWidth).toString());
|
|
1821
|
-
legendShapeId.setAttribute('stroke-opacity', (legendToggleBorderOpacity).toString());
|
|
1822
|
-
legendTextId.setAttribute('fill', legendToggleFill);
|
|
1817
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1823
1818
|
}
|
|
1824
1819
|
else {
|
|
1825
|
-
legendTextId.
|
|
1826
|
-
legendShapeId.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
1827
|
-
legendShapeId.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
1828
|
-
legendShapeId.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
1829
|
-
legendShapeId.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
1830
|
-
legendShapeId.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
1831
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
1832
|
-
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
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);
|
|
1833
1821
|
}
|
|
1834
1822
|
}
|
|
1835
1823
|
}
|
|
@@ -1842,16 +1830,11 @@ var Legend = /** @class */ (function () {
|
|
|
1842
1830
|
}
|
|
1843
1831
|
if (targetEle !== null) {
|
|
1844
1832
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1845
|
-
|
|
1846
|
-
legendShapeId.
|
|
1847
|
-
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['shapeBorder']['color']);
|
|
1848
|
-
legendShapeId.setAttribute('stroke-width', this.legendCollection[legendIndex]['shapeBorder']['width']);
|
|
1849
|
-
legendShapeId.setAttribute('stroke-opacity', this.legendCollection[legendIndex]['shapeBorder']['opacity']);
|
|
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');
|
|
1850
1835
|
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
1851
1836
|
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
|
|
1852
1837
|
}
|
|
1853
|
-
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1854
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
1855
1838
|
}
|
|
1856
1839
|
}
|
|
1857
1840
|
}
|
|
@@ -1898,9 +1881,13 @@ var Legend = /** @class */ (function () {
|
|
|
1898
1881
|
}
|
|
1899
1882
|
if (targetEle !== null) {
|
|
1900
1883
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1901
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
1902
1884
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1903
|
-
|
|
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
|
+
}
|
|
1904
1891
|
}
|
|
1905
1892
|
}
|
|
1906
1893
|
else {
|
|
@@ -1919,9 +1906,8 @@ var Legend = /** @class */ (function () {
|
|
|
1919
1906
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
1920
1907
|
if (targetEle !== null) {
|
|
1921
1908
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
1922
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
1923
1909
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
1924
|
-
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');
|
|
1925
1911
|
}
|
|
1926
1912
|
}
|
|
1927
1913
|
}
|
|
@@ -1975,22 +1961,10 @@ var Legend = /** @class */ (function () {
|
|
|
1975
1961
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
1976
1962
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
1977
1963
|
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
1978
|
-
|
|
1979
|
-
legendShapeId.setAttribute('fill', legendToggleFill);
|
|
1980
|
-
legendShapeId.setAttribute('fill-opacity', (legendToggleOpacity).toString());
|
|
1981
|
-
legendShapeId.setAttribute('stroke', legendToggleBorderColor);
|
|
1982
|
-
legendShapeId.setAttribute('stroke-width', (legendToggleBorderWidth).toString());
|
|
1983
|
-
legendShapeId.setAttribute('stroke-opacity', (legendToggleBorderOpacity).toString());
|
|
1964
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1984
1965
|
}
|
|
1985
1966
|
else {
|
|
1986
|
-
legendTextId.
|
|
1987
|
-
legendShapeId.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
1988
|
-
legendShapeId.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
1989
|
-
legendShapeId.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
1990
|
-
legendShapeId.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
1991
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
1992
|
-
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
1993
|
-
legendShapeId.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
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);
|
|
1994
1968
|
}
|
|
1995
1969
|
}
|
|
1996
1970
|
}
|
|
@@ -2056,9 +2030,13 @@ var Legend = /** @class */ (function () {
|
|
|
2056
2030
|
}
|
|
2057
2031
|
if (targetEle !== null) {
|
|
2058
2032
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
2059
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
2060
2033
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
2061
|
-
|
|
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
|
+
}
|
|
2062
2040
|
}
|
|
2063
2041
|
}
|
|
2064
2042
|
else {
|
|
@@ -2078,9 +2056,8 @@ var Legend = /** @class */ (function () {
|
|
|
2078
2056
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
2079
2057
|
if (targetEle !== null) {
|
|
2080
2058
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
2081
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
2082
2059
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
2083
|
-
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');
|
|
2084
2061
|
}
|
|
2085
2062
|
}
|
|
2086
2063
|
}
|
|
@@ -2157,6 +2134,16 @@ var Legend = /** @class */ (function () {
|
|
|
2157
2134
|
}
|
|
2158
2135
|
return legendData;
|
|
2159
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
|
+
};
|
|
2160
2147
|
Legend.prototype.legendGradientColor = function (colorMap, legendIndex) {
|
|
2161
2148
|
var legendFillColor;
|
|
2162
2149
|
var xmlns = 'http://www.w3.org/2000/svg';
|