@syncfusion/ej2-maps 26.1.41 → 26.2.4
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/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 +40 -33
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +40 -33
- 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/user-interaction/tooltip.js +28 -21
- package/src/maps/utils/helper.js +12 -12
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -1605,10 +1605,10 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
|
|
|
1605
1605
|
+ ' ' + location.y + ' Z';
|
|
1606
1606
|
break;
|
|
1607
1607
|
case 'Star':
|
|
1608
|
-
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1609
|
-
+ ' ' + (location.y
|
|
1610
|
-
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y
|
|
1611
|
-
(location.y
|
|
1608
|
+
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1609
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1610
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1611
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1612
1612
|
break;
|
|
1613
1613
|
case 'Triangle':
|
|
1614
1614
|
options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + (location.x + size.width / 2) + ' ' +
|
|
@@ -1734,10 +1734,10 @@ function drawVerticalLine(maps, options, size, location, element) {
|
|
|
1734
1734
|
* @private
|
|
1735
1735
|
*/
|
|
1736
1736
|
function drawStar(maps, options, size, location, element) {
|
|
1737
|
-
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1738
|
-
+ ' ' + (location.y
|
|
1739
|
-
+ (location.x - size.width / 3) + ' ' + (location.y
|
|
1740
|
-
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1737
|
+
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1738
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6) + ' L '
|
|
1739
|
+
+ (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' + (location.y - size.height / 2)
|
|
1740
|
+
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1741
1741
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1742
1742
|
}
|
|
1743
1743
|
/**
|
|
@@ -3098,10 +3098,10 @@ function renderLegendShape(location, size, shape, options, url) {
|
|
|
3098
3098
|
merge(options, { 'd': renderPath });
|
|
3099
3099
|
break;
|
|
3100
3100
|
case 'Star':
|
|
3101
|
-
renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
3102
|
-
+ ' ' + (location.y
|
|
3103
|
-
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y
|
|
3104
|
-
(location.y
|
|
3101
|
+
renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
3102
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
3103
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
3104
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
3105
3105
|
merge(options, { 'd': renderPath });
|
|
3106
3106
|
break;
|
|
3107
3107
|
case 'Cross':
|
|
@@ -14995,34 +14995,41 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14995
14995
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
14996
14996
|
if (!isNullOrUndefined(properties)) {
|
|
14997
14997
|
for (var k = 0; k < properties.length; k++) {
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
(
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
14998
|
+
if (!isNullOrUndefined(layer.dataSource)) {
|
|
14999
|
+
for (var i = 0; i < layer['dataSource']['length']; i++) {
|
|
15000
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15001
|
+
var data = layer.dataSource[i];
|
|
15002
|
+
var dataPath = (layer.shapeDataPath.indexOf('.') > -1) ?
|
|
15003
|
+
(getValueFromObject(data, layer.shapeDataPath)) : data[layer.shapeDataPath];
|
|
15004
|
+
var dataPathValue = !isNullOrUndefined(dataPath) && isNaN(data[layer.shapeDataPath])
|
|
15005
|
+
? dataPath.toLowerCase() : dataPath;
|
|
15006
|
+
var propertyValue = !isNullOrUndefined(value[properties[k]])
|
|
15007
|
+
&& isNaN(value[properties[k]]) ? value[properties[k]].toLowerCase() :
|
|
15008
|
+
value[properties[k]];
|
|
15009
|
+
if (dataPathValue === propertyValue) {
|
|
15010
|
+
isShape = true;
|
|
15011
|
+
index = i;
|
|
15012
|
+
k = properties.length;
|
|
15013
|
+
break;
|
|
15014
|
+
}
|
|
15013
15015
|
}
|
|
15014
15016
|
}
|
|
15015
15017
|
}
|
|
15016
15018
|
index = isShape ? index : null;
|
|
15017
|
-
if (
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
templateData
|
|
15019
|
+
if (layer['dataSource'] && layer['dataSource']['length'] > 0) {
|
|
15020
|
+
if (!isNullOrUndefined(layer.dataSource[index])) {
|
|
15021
|
+
templateData = JSON.parse(JSON.stringify(layer.dataSource[index]));
|
|
15022
|
+
for (keyString in value) {
|
|
15023
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
15024
|
+
if (!templateData.hasOwnProperty(keyString)) {
|
|
15025
|
+
templateData[keyString] = value[keyString];
|
|
15026
|
+
}
|
|
15023
15027
|
}
|
|
15024
15028
|
}
|
|
15025
15029
|
}
|
|
15030
|
+
else {
|
|
15031
|
+
templateData = value;
|
|
15032
|
+
}
|
|
15026
15033
|
}
|
|
15027
15034
|
if (option.visible && ((!isNullOrUndefined(index) && !isNaN(index)) || (!isNullOrUndefined(value)))) {
|
|
15028
15035
|
if (layer.tooltipSettings.format) {
|