@syncfusion/ej2-treemap 22.1.34 → 22.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.
@@ -2992,15 +2992,17 @@ var Print = /** @__PURE__ @class */ (function () {
2992
2992
  }
2993
2993
  else {
2994
2994
  var exportElement = treeMap.element.cloneNode(true);
2995
- var backgroundElement = exportElement.childNodes[1];
2995
+ var backgroundElement = exportElement.getElementsByTagName('svg')[0];
2996
2996
  if (!isNullOrUndefined(backgroundElement)) {
2997
2997
  backgroundElement = backgroundElement.childNodes[0];
2998
- var backgroundColor = backgroundElement.getAttribute('fill');
2999
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3000
- exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
3001
- }
3002
- else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3003
- exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
2998
+ if (!isNullOrUndefined(backgroundElement)) {
2999
+ var backgroundColor = backgroundElement.getAttribute('fill');
3000
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3001
+ backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
3002
+ }
3003
+ else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
3004
+ backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
3005
+ }
3004
3006
  }
3005
3007
  }
3006
3008
  div.appendChild(exportElement);