@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
|
@@ -1552,10 +1552,10 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
|
|
|
1552
1552
|
+ ' ' + location.y + ' Z';
|
|
1553
1553
|
break;
|
|
1554
1554
|
case 'Star':
|
|
1555
|
-
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1556
|
-
+ ' ' + (location.y
|
|
1557
|
-
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y
|
|
1558
|
-
(location.y
|
|
1555
|
+
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1556
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1557
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1558
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1559
1559
|
break;
|
|
1560
1560
|
case 'Triangle':
|
|
1561
1561
|
options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + (location.x + size.width / 2) + ' ' +
|
|
@@ -1681,10 +1681,10 @@ function drawVerticalLine(maps, options, size, location, element) {
|
|
|
1681
1681
|
* @private
|
|
1682
1682
|
*/
|
|
1683
1683
|
function drawStar(maps, options, size, location, element) {
|
|
1684
|
-
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1685
|
-
+ ' ' + (location.y
|
|
1686
|
-
+ (location.x - size.width / 3) + ' ' + (location.y
|
|
1687
|
-
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
1684
|
+
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1685
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6) + ' L '
|
|
1686
|
+
+ (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' + (location.y - size.height / 2)
|
|
1687
|
+
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1688
1688
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1689
1689
|
}
|
|
1690
1690
|
/**
|
|
@@ -3041,10 +3041,10 @@ function renderLegendShape(location, size, shape, options, url) {
|
|
|
3041
3041
|
merge(options, { 'd': renderPath });
|
|
3042
3042
|
break;
|
|
3043
3043
|
case 'Star':
|
|
3044
|
-
renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y
|
|
3045
|
-
+ ' ' + (location.y
|
|
3046
|
-
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y
|
|
3047
|
-
(location.y
|
|
3044
|
+
renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
3045
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
3046
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
3047
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
3048
3048
|
merge(options, { 'd': renderPath });
|
|
3049
3049
|
break;
|
|
3050
3050
|
case 'Cross':
|
|
@@ -14633,34 +14633,41 @@ class MapsTooltip {
|
|
|
14633
14633
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
14634
14634
|
if (!isNullOrUndefined(properties)) {
|
|
14635
14635
|
for (let k = 0; k < properties.length; k++) {
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
(
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14636
|
+
if (!isNullOrUndefined(layer.dataSource)) {
|
|
14637
|
+
for (let i = 0; i < layer['dataSource']['length']; i++) {
|
|
14638
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14639
|
+
const data = layer.dataSource[i];
|
|
14640
|
+
const dataPath = (layer.shapeDataPath.indexOf('.') > -1) ?
|
|
14641
|
+
(getValueFromObject(data, layer.shapeDataPath)) : data[layer.shapeDataPath];
|
|
14642
|
+
const dataPathValue = !isNullOrUndefined(dataPath) && isNaN(data[layer.shapeDataPath])
|
|
14643
|
+
? dataPath.toLowerCase() : dataPath;
|
|
14644
|
+
const propertyValue = !isNullOrUndefined(value[properties[k]])
|
|
14645
|
+
&& isNaN(value[properties[k]]) ? value[properties[k]].toLowerCase() :
|
|
14646
|
+
value[properties[k]];
|
|
14647
|
+
if (dataPathValue === propertyValue) {
|
|
14648
|
+
isShape = true;
|
|
14649
|
+
index = i;
|
|
14650
|
+
k = properties.length;
|
|
14651
|
+
break;
|
|
14652
|
+
}
|
|
14651
14653
|
}
|
|
14652
14654
|
}
|
|
14653
14655
|
}
|
|
14654
14656
|
index = isShape ? index : null;
|
|
14655
|
-
if (
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
templateData
|
|
14657
|
+
if (layer['dataSource'] && layer['dataSource']['length'] > 0) {
|
|
14658
|
+
if (!isNullOrUndefined(layer.dataSource[index])) {
|
|
14659
|
+
templateData = JSON.parse(JSON.stringify(layer.dataSource[index]));
|
|
14660
|
+
for (keyString in value) {
|
|
14661
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
14662
|
+
if (!templateData.hasOwnProperty(keyString)) {
|
|
14663
|
+
templateData[keyString] = value[keyString];
|
|
14664
|
+
}
|
|
14661
14665
|
}
|
|
14662
14666
|
}
|
|
14663
14667
|
}
|
|
14668
|
+
else {
|
|
14669
|
+
templateData = value;
|
|
14670
|
+
}
|
|
14664
14671
|
}
|
|
14665
14672
|
if (option.visible && ((!isNullOrUndefined(index) && !isNaN(index)) || (!isNullOrUndefined(value)))) {
|
|
14666
14673
|
if (layer.tooltipSettings.format) {
|