@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.
@@ -2892,15 +2892,17 @@ class Print {
2892
2892
  }
2893
2893
  else {
2894
2894
  const exportElement = treeMap.element.cloneNode(true);
2895
- let backgroundElement = exportElement.childNodes[1];
2895
+ let backgroundElement = exportElement.getElementsByTagName('svg')[0];
2896
2896
  if (!isNullOrUndefined(backgroundElement)) {
2897
2897
  backgroundElement = backgroundElement.childNodes[0];
2898
- const backgroundColor = backgroundElement.getAttribute('fill');
2899
- if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2900
- exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
2901
- }
2902
- else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2903
- exportElement.childNodes[1].childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
2898
+ if (!isNullOrUndefined(backgroundElement)) {
2899
+ const backgroundColor = backgroundElement.getAttribute('fill');
2900
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Fluent' || treeMap.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2901
+ backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
2902
+ }
2903
+ else if ((treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5Dark' || treeMap.theme === 'FluentDark' || treeMap.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
2904
+ backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
2905
+ }
2904
2906
  }
2905
2907
  }
2906
2908
  div.appendChild(exportElement);