@syncfusion/ej2-maps 19.4.53 → 20.1.47

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.
@@ -1276,7 +1276,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
1276
1276
  */
1277
1277
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1278
1278
  export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
1279
- templateFn = getTemplateFunction(eventArgs.template);
1279
+ templateFn = getTemplateFunction(eventArgs.template, maps);
1280
1280
  if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
1281
1281
  var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
1282
1282
  var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
@@ -1312,8 +1312,10 @@ export function maintainSelection(elementId, elementClass, element, className) {
1312
1312
  if (elementId) {
1313
1313
  for (var index = 0; index < elementId.length; index++) {
1314
1314
  if (element.getAttribute('id') === elementId[index]) {
1315
- if (isNullOrUndefined(getElement(elementClass.id)) || index === 0) {
1316
- document.body.appendChild(elementClass);
1315
+ if (index === 0 || element.tagName === 'g') {
1316
+ if (!isNullOrUndefined(elementClass) && !isNullOrUndefined(elementClass.id)) {
1317
+ document.body.appendChild(elementClass);
1318
+ }
1317
1319
  if (element.id.indexOf('_MarkerIndex_') > -1 && element.childElementCount > 0) {
1318
1320
  element.children[0].setAttribute('class', className);
1319
1321
  }
@@ -2274,6 +2276,22 @@ export function fixInitialScaleForTile(map) {
2274
2276
  export function getElementByID(id) {
2275
2277
  return document.getElementById(id);
2276
2278
  }
2279
+ /**
2280
+ * Function to get clientElement from id.
2281
+ *
2282
+ * @param {string} id - Specifies the id
2283
+ * @returns {Element} - Returns the element
2284
+ * @private
2285
+ */
2286
+ export function getClientElement(id) {
2287
+ var element = document.getElementById(id);
2288
+ if (!isNullOrUndefined(element)) {
2289
+ return element.getClientRects()[0];
2290
+ }
2291
+ else {
2292
+ return null;
2293
+ }
2294
+ }
2277
2295
  /**
2278
2296
  * To apply internalization
2279
2297
  *
@@ -2294,7 +2312,7 @@ export function Internalize(maps, value) {
2294
2312
  * @private
2295
2313
  */
2296
2314
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2297
- export function getTemplateFunction(template) {
2315
+ export function getTemplateFunction(template, maps) {
2298
2316
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2299
2317
  var templateFn = null;
2300
2318
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2303,6 +2321,9 @@ export function getTemplateFunction(template) {
2303
2321
  if (document.querySelectorAll(template).length) {
2304
2322
  templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
2305
2323
  }
2324
+ else if (maps.isVue || maps.isVue3) {
2325
+ templateFn = templateComplier(template);
2326
+ }
2306
2327
  }
2307
2328
  catch (e) {
2308
2329
  templateFn = templateComplier(template);
@@ -2707,6 +2728,7 @@ export function createTooltip(id, text, top, left, fontSize) {
2707
2728
  'left:' + left.toString() + 'px;' +
2708
2729
  'color: #000000; ' +
2709
2730
  'background:' + '#FFFFFF' + ';' +
2731
+ 'z-index: 2;' +
2710
2732
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2711
2733
  if (!tooltip) {
2712
2734
  tooltip = createElement('div', {
@@ -2908,6 +2930,9 @@ export function changeBorderWidth(element, index, scale, maps) {
2908
2930
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2909
2931
  }
2910
2932
  }
2933
+ else {
2934
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2935
+ }
2911
2936
  }
2912
2937
  else {
2913
2938
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);