@syncfusion/ej2-maps 21.2.3 → 21.2.5
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 +14 -0
- 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 +17 -14
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +17 -14
- 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 +11 -8
- package/src/maps/layers/marker.js +1 -1
- package/src/maps/user-interaction/tooltip.js +11 -8
- package/src/maps/utils/helper.js +5 -5
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -1046,10 +1046,10 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1046
1046
|
var ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: 0 }, clusterID, shapeCustom, markerCollection, maps);
|
|
1047
1047
|
ele.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
|
|
1048
1048
|
if (eventArg.shape === 'Balloon') {
|
|
1049
|
-
ele.children[0].
|
|
1049
|
+
ele.children[0].textContent = indexCollection.toString();
|
|
1050
1050
|
}
|
|
1051
1051
|
else {
|
|
1052
|
-
ele.
|
|
1052
|
+
ele.textContent = indexCollection.toString();
|
|
1053
1053
|
}
|
|
1054
1054
|
options = new TextOption(labelID, (0), postionY, 'middle', (colloideBounds.length + 1).toString(), '', '');
|
|
1055
1055
|
textElement = renderTextElement(options, style, style.color, markerCollection);
|
|
@@ -1148,7 +1148,7 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
|
|
|
1148
1148
|
var markerEle;
|
|
1149
1149
|
var markerDataLength = sameMarkerData[0].data.length;
|
|
1150
1150
|
for (var i = 0; i < markerDataLength; i++) {
|
|
1151
|
-
markerEle = marker.shape === 'Balloon' ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1151
|
+
markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1152
1152
|
markerEle['style']['visibility'] = 'hidden';
|
|
1153
1153
|
}
|
|
1154
1154
|
removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
|
|
@@ -1177,7 +1177,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1177
1177
|
var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
|
|
1178
1178
|
clusterEle.setAttribute('visibility', 'hidden');
|
|
1179
1179
|
clusterEleLabel.setAttribute('visibility', 'hidden');
|
|
1180
|
-
var markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
|
|
1180
|
+
var markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
|
|
1181
1181
|
var height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
|
|
1182
1182
|
var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
|
|
1183
1183
|
var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
|
|
@@ -1213,7 +1213,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1213
1213
|
var x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
|
|
1214
1214
|
var y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
|
|
1215
1215
|
path += start + 'L ' + (x1) + ' ' + y1 + ' ';
|
|
1216
|
-
markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1216
|
+
markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1217
1217
|
if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
|
|
1218
1218
|
markerEle['style']['transform'] = '';
|
|
1219
1219
|
markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
|
|
@@ -5498,7 +5498,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5498
5498
|
if ((target.indexOf('_cluster_') > -1)) {
|
|
5499
5499
|
var isClusterSame = false;
|
|
5500
5500
|
var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
|
|
5501
|
-
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].
|
|
5501
|
+
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].textContent.split(',').map(Number) : clusterElement.textContent.split(',').map(Number);
|
|
5502
5502
|
collection_1 = [];
|
|
5503
5503
|
for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
|
|
5504
5504
|
var i = indexes_1[_i];
|
|
@@ -14153,7 +14153,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14153
14153
|
}
|
|
14154
14154
|
}
|
|
14155
14155
|
else {
|
|
14156
|
-
_this.clearTooltip();
|
|
14156
|
+
_this.clearTooltip(e.target);
|
|
14157
14157
|
}
|
|
14158
14158
|
});
|
|
14159
14159
|
if (this.svgTooltip) {
|
|
@@ -14168,7 +14168,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14168
14168
|
});
|
|
14169
14169
|
}
|
|
14170
14170
|
else {
|
|
14171
|
-
this.clearTooltip();
|
|
14171
|
+
this.clearTooltip(e.target);
|
|
14172
14172
|
}
|
|
14173
14173
|
}
|
|
14174
14174
|
else {
|
|
@@ -14178,7 +14178,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14178
14178
|
this.maps.notify(click, this);
|
|
14179
14179
|
}
|
|
14180
14180
|
else {
|
|
14181
|
-
this.clearTooltip();
|
|
14181
|
+
this.clearTooltip(e.target);
|
|
14182
14182
|
}
|
|
14183
14183
|
}
|
|
14184
14184
|
};
|
|
@@ -14237,11 +14237,14 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14237
14237
|
}
|
|
14238
14238
|
return isTooltipRemoved;
|
|
14239
14239
|
};
|
|
14240
|
-
MapsTooltip.prototype.clearTooltip = function () {
|
|
14241
|
-
var
|
|
14242
|
-
if (
|
|
14243
|
-
|
|
14244
|
-
|
|
14240
|
+
MapsTooltip.prototype.clearTooltip = function (element) {
|
|
14241
|
+
var tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
14242
|
+
if (isNullOrUndefined(tooltipElement)) {
|
|
14243
|
+
var isTooltipRemoved = this.removeTooltip();
|
|
14244
|
+
if (isTooltipRemoved) {
|
|
14245
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14246
|
+
this.maps.clearTemplate();
|
|
14247
|
+
}
|
|
14245
14248
|
}
|
|
14246
14249
|
};
|
|
14247
14250
|
// eslint-disable-next-line valid-jsdoc
|