@syncfusion/ej2-treemap 20.2.45 → 20.3.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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.45
3
+ * version : 20.3.47
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treemap@*",
3
- "_id": "@syncfusion/ej2-treemap@20.2.38",
3
+ "_id": "@syncfusion/ej2-treemap@16.30.8",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-g3c3FH0FXC9HUf6CYB7xQdz7X32gSAwMHQwTzv8piDBsRdc1TOzhi+IVFYnDo4IUL5fp1JBB8Fb1p4IjtBfEIw==",
5
+ "_integrity": "sha512-JwUy66HrBScRNb6zrjFgsz2QSKNtYgTwL7n3fHbrgy7t2W6leTOGZj3ZSjJUVvHqA6LX9zZtijssdg87rN+jew==",
6
6
  "_location": "/@syncfusion/ej2-treemap",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-treemap",
24
24
  "/@syncfusion/ej2-vue-treemap"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-20.2.38.tgz",
27
- "_shasum": "57cb5cae16af5ad05f75720d0e605e284e03413d",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treemap/-/ej2-treemap-16.30.8.tgz",
27
+ "_shasum": "6f1c2738e6e72bf212a8b6c4edd0431d3fadad05",
28
28
  "_spec": "@syncfusion/ej2-treemap@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,17 +35,17 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.2.45",
39
- "@syncfusion/ej2-compression": "~20.2.45",
40
- "@syncfusion/ej2-data": "~20.2.45",
41
- "@syncfusion/ej2-file-utils": "~20.2.45",
42
- "@syncfusion/ej2-pdf-export": "~20.2.45",
43
- "@syncfusion/ej2-svg-base": "~20.2.45"
38
+ "@syncfusion/ej2-base": "~20.3.47",
39
+ "@syncfusion/ej2-compression": "~20.3.47",
40
+ "@syncfusion/ej2-data": "~20.3.47",
41
+ "@syncfusion/ej2-file-utils": "~20.3.47",
42
+ "@syncfusion/ej2-pdf-export": "~20.3.47",
43
+ "@syncfusion/ej2-svg-base": "~20.3.47"
44
44
  },
45
45
  "deprecated": false,
46
46
  "description": "Essential JS 2 TreeMap Components",
47
47
  "devDependencies": {},
48
- "es2015": "./dist/es6/ej2-treemap.es2015.js",
48
+ "es2015": "./dist/es6/ej2-treemap.es5.js",
49
49
  "homepage": "https://github.com/syncfusion/ej2-javascript-ui-controls#readme",
50
50
  "keywords": [
51
51
  "ej2",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "20.2.45",
76
+ "version": "20.3.47",
77
77
  "sideEffects": false
78
78
  }
@@ -84,11 +84,10 @@ export declare class TreeMapLegend {
84
84
  /**
85
85
  * To destroy the legend.
86
86
  *
87
- * @param {TreeMap} treemap - Specifies treemap instance
88
87
  * @returns {void}
89
88
  * @private
90
89
  */
91
- destroy(treemap: TreeMap): void;
90
+ destroy(): void;
92
91
  /**
93
92
  * Get the gradient color for interactive legend.
94
93
  */
@@ -958,15 +958,25 @@ var TreeMapLegend = /** @class */ (function () {
958
958
  /**
959
959
  * To destroy the legend.
960
960
  *
961
- * @param {TreeMap} treemap - Specifies treemap instance
962
961
  * @returns {void}
963
962
  * @private
964
963
  */
965
- TreeMapLegend.prototype.destroy = function (treemap) {
966
- /**
967
- * Destroy method performed here
968
- */
964
+ TreeMapLegend.prototype.destroy = function () {
965
+ this.legendRenderingCollections = [];
966
+ this.legendCollections = [];
967
+ this.outOfRangeLegend = null;
968
+ this.totalPages = [];
969
+ this.translate = null;
970
+ this.legendBorderRect = null;
971
+ this.legendGroup = null;
972
+ this.legendNames = [];
973
+ this.defsElement = null;
974
+ this.legendLinearGradient = null;
975
+ this.legendInteractiveGradient = [];
976
+ this.legendItemRect = null;
969
977
  this.removeEventListener();
978
+ //TODO: The removeInteractivePointer method (calling method) is called in a timer in the mouseUpHandler method. Because of this handling, adding the below code results in a spec failure.
979
+ //this.treemap = null;
970
980
  };
971
981
  // eslint-disable-next-line valid-jsdoc
972
982
  /**
@@ -37,4 +37,10 @@ export declare class LayoutPanel {
37
37
  private getSaturatedColor;
38
38
  private renderTemplate;
39
39
  private labelInterSectAction;
40
+ /**
41
+ *
42
+ * @returns {void}
43
+ * @private
44
+ */
45
+ destroy(): void;
40
46
  }
@@ -563,6 +563,7 @@ var LayoutPanel = /** @class */ (function () {
563
563
  }
564
564
  }
565
565
  itemGroup.setAttribute('aria-label', item['name']);
566
+ itemGroup.setAttribute('role', '');
566
567
  itemGroup.setAttribute('tabindex', (_this.treemap.tabIndex + i + 2).toString());
567
568
  maintainSelection(_this.treemap, itemGroup, 'treeMapSelection');
568
569
  _this.layoutGroup.appendChild(itemGroup);
@@ -734,6 +735,19 @@ var LayoutPanel = /** @class */ (function () {
734
735
  }
735
736
  return textValue;
736
737
  };
738
+ /**
739
+ *
740
+ * @returns {void}
741
+ * @private
742
+ */
743
+ LayoutPanel.prototype.destroy = function () {
744
+ this.treemap = null;
745
+ this.currentRect = null;
746
+ this.layoutGroup = null;
747
+ this.renderer = null;
748
+ this.renderItems = [];
749
+ this.parentData = [];
750
+ };
737
751
  return LayoutPanel;
738
752
  }());
739
753
  export { LayoutPanel };
@@ -6,7 +6,6 @@ import { ExportType } from '../utils/enum';
6
6
  * @hidden
7
7
  */
8
8
  export declare class ImageExport {
9
- private control;
10
9
  /**
11
10
  * Constructor for Maps
12
11
  *
@@ -22,14 +21,13 @@ export declare class ImageExport {
22
21
  * @returns {Promise} - Returns the promise string.
23
22
  * @private
24
23
  */
25
- export(type: ExportType, fileName: string, allowDownload?: boolean): Promise<string>;
24
+ export(treeMap: TreeMap, type: ExportType, fileName: string, allowDownload?: boolean): Promise<string>;
26
25
  protected getModuleName(): string;
27
26
  /**
28
27
  * To destroy the ImageExport.
29
28
  *
30
- * @param {TreeMap} treemap - Specifies the instance of the treemap.
31
29
  * @returns {void}
32
30
  * @private
33
31
  */
34
- destroy(treemap: TreeMap): void;
32
+ destroy(): void;
35
33
  }
@@ -13,7 +13,6 @@ var ImageExport = /** @class */ (function () {
13
13
  */
14
14
  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
15
15
  function ImageExport(control) {
16
- this.control = control;
17
16
  }
18
17
  /**
19
18
  * This method is used to perform the export functionality for the rendered treemap.
@@ -24,23 +23,22 @@ var ImageExport = /** @class */ (function () {
24
23
  * @returns {Promise} - Returns the promise string.
25
24
  * @private
26
25
  */
27
- ImageExport.prototype.export = function (type, fileName, allowDownload) {
28
- var _this = this;
26
+ ImageExport.prototype.export = function (treeMap, type, fileName, allowDownload) {
29
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
28
  var promise = new Promise(function (resolve, reject) {
31
29
  var element = createElement('canvas', {
32
30
  id: 'ej2-canvas',
33
31
  attrs: {
34
- 'height': _this.control.availableSize.height.toString(),
35
- 'width': _this.control.availableSize.width.toString()
32
+ 'height': treeMap.availableSize.height.toString(),
33
+ 'width': treeMap.availableSize.width.toString()
36
34
  }
37
35
  });
38
36
  var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
39
37
  var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
40
- _this.control.svgObject.outerHTML +
38
+ treeMap.svgObject.outerHTML +
41
39
  '</svg>';
42
40
  var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
43
- [(new XMLSerializer()).serializeToString(_this.control.svgObject)], { type: 'image/svg+xml' }));
41
+ [(new XMLSerializer()).serializeToString(treeMap.svgObject)], { type: 'image/svg+xml' }));
44
42
  if (type === 'SVG') {
45
43
  if (allowDownload) {
46
44
  triggerDownload(fileName, type, url, isDownload);
@@ -79,13 +77,10 @@ var ImageExport = /** @class */ (function () {
79
77
  /**
80
78
  * To destroy the ImageExport.
81
79
  *
82
- * @param {TreeMap} treemap - Specifies the instance of the treemap.
83
80
  * @returns {void}
84
81
  * @private
85
82
  */
86
- ImageExport.prototype.destroy = function (treemap) {
87
- // Destroy method performed here
88
- };
83
+ ImageExport.prototype.destroy = function () { };
89
84
  return ImageExport;
90
85
  }());
91
86
  export { ImageExport };
@@ -7,7 +7,6 @@ import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
7
7
  * @hidden
8
8
  */
9
9
  export declare class PdfExport {
10
- private control;
11
10
  /**
12
11
  * Constructor for Maps
13
12
  *
@@ -24,14 +23,13 @@ export declare class PdfExport {
24
23
  * @returns {Promise} - Returns the string.
25
24
  * @private
26
25
  */
27
- export(type: ExportType, fileName: string, orientation?: PdfPageOrientation, allowDownload?: boolean): Promise<string>;
26
+ export(treeMap: TreeMap, type: ExportType, fileName: string, orientation?: PdfPageOrientation, allowDownload?: boolean): Promise<string>;
28
27
  protected getModuleName(): string;
29
28
  /**
30
- * To destroy the ImageExport.
29
+ * To destroy the PdfExport.
31
30
  *
32
- * @param {TreeMap} treemap - Specifies the treemap instance.
33
31
  * @returns {void}
34
32
  * @private
35
33
  */
36
- destroy(treemap: TreeMap): void;
34
+ destroy(): void;
37
35
  }
@@ -13,7 +13,6 @@ var PdfExport = /** @class */ (function () {
13
13
  */
14
14
  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
15
15
  function PdfExport(control) {
16
- this.control = control;
17
16
  }
18
17
  /**
19
18
  * This method is used to perform the export functionality for the rendered treemap.
@@ -25,25 +24,24 @@ var PdfExport = /** @class */ (function () {
25
24
  * @returns {Promise} - Returns the string.
26
25
  * @private
27
26
  */
28
- PdfExport.prototype.export = function (type, fileName, orientation, allowDownload) {
29
- var _this = this;
27
+ PdfExport.prototype.export = function (treeMap, type, fileName, orientation, allowDownload) {
30
28
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
29
  var promise = new Promise(function (resolve, reject) {
32
30
  var element = createElement('canvas', {
33
31
  id: 'ej2-canvas',
34
32
  attrs: {
35
- 'width': _this.control.availableSize.width.toString(),
36
- 'height': _this.control.availableSize.height.toString()
33
+ 'width': treeMap.availableSize.width.toString(),
34
+ 'height': treeMap.availableSize.height.toString()
37
35
  }
38
36
  });
39
37
  var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
40
38
  orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
41
- var exportElement = _this.control.svgObject.cloneNode(true);
39
+ var exportElement = treeMap.svgObject.cloneNode(true);
42
40
  var backgroundElement = exportElement.childNodes[0];
43
41
  if (!isNullOrUndefined(backgroundElement)) {
44
42
  var backgroundColor = backgroundElement.getAttribute('fill');
45
- if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
46
- || _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
43
+ if ((treeMap.theme === 'Tailwind' || treeMap.theme === 'TailwindDark' || treeMap.theme === 'Bootstrap5' || treeMap.theme === 'Bootstrap5Dark'
44
+ || treeMap.theme === 'Fluent' || treeMap.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
47
45
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
48
46
  }
49
47
  }
@@ -57,7 +55,7 @@ var PdfExport = /** @class */ (function () {
57
55
  var imageString = element.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
58
56
  document.pageSettings.orientation = orientation;
59
57
  imageString = imageString.slice(imageString.indexOf(',') + 1);
60
- document.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
58
+ document.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (treeMap.availableSize.width - 60), treeMap.availableSize.height);
61
59
  if (allowDownload) {
62
60
  document.save(fileName + '.pdf');
63
61
  document.destroy();
@@ -75,15 +73,12 @@ var PdfExport = /** @class */ (function () {
75
73
  return 'PdfExport';
76
74
  };
77
75
  /**
78
- * To destroy the ImageExport.
76
+ * To destroy the PdfExport.
79
77
  *
80
- * @param {TreeMap} treemap - Specifies the treemap instance.
81
78
  * @returns {void}
82
79
  * @private
83
80
  */
84
- PdfExport.prototype.destroy = function (treemap) {
85
- // Destroy method performed here
86
- };
81
+ PdfExport.prototype.destroy = function () { };
87
82
  return PdfExport;
88
83
  }());
89
84
  export { PdfExport };
@@ -5,8 +5,6 @@ import { TreeMap } from '../../index';
5
5
  * @hidden
6
6
  */
7
7
  export declare class Print {
8
- private control;
9
- private printWindow;
10
8
  /**
11
9
  * Constructor for Maps
12
10
  *
@@ -20,7 +18,7 @@ export declare class Print {
20
18
  * @returns {void}
21
19
  * @private
22
20
  */
23
- print(elements?: string[] | string | Element): void;
21
+ print(treeMap: TreeMap, elements?: string[] | string | Element): void;
24
22
  /**
25
23
  * To get the html string of the Maps
26
24
  *
@@ -28,7 +26,7 @@ export declare class Print {
28
26
  * @returns {Element} - Returns the element
29
27
  * @private
30
28
  */
31
- getHTMLContent(elements?: string[] | string | Element): Element;
29
+ getHTMLContent(treeMap: TreeMap, elements?: string[] | string | Element): Element;
32
30
  /**
33
31
  * Get module name.
34
32
  *
@@ -36,11 +34,10 @@ export declare class Print {
36
34
  */
37
35
  protected getModuleName(): string;
38
36
  /**
39
- * To destroy the legend.
37
+ * To destroy the Print module.
40
38
  *
41
- * @param {TreeMap} treemap - Specifies the treemap instance
42
39
  * @returns {void}
43
40
  * @private
44
41
  */
45
- destroy(treemap: TreeMap): void;
42
+ destroy(): void;
46
43
  }
@@ -1,4 +1,4 @@
1
- import { print as printWindow, createElement } from '@syncfusion/ej2-base';
1
+ import { print as printFunction, createElement } from '@syncfusion/ej2-base';
2
2
  import { getElement } from '../utils/helper';
3
3
  import { beforePrint } from '../model/constants';
4
4
  /**
@@ -14,7 +14,6 @@ var Print = /** @class */ (function () {
14
14
  */
15
15
  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
16
16
  function Print(control) {
17
- this.control = control;
18
17
  }
19
18
  /**
20
19
  * This method is used to perform the print functionality in treemap.
@@ -23,17 +22,16 @@ var Print = /** @class */ (function () {
23
22
  * @returns {void}
24
23
  * @private
25
24
  */
26
- Print.prototype.print = function (elements) {
27
- var _this = this;
28
- this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
29
- this.printWindow.moveTo(0, 0);
30
- this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
25
+ Print.prototype.print = function (treeMap, elements) {
26
+ var printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
27
+ printWindow.moveTo(0, 0);
28
+ printWindow.resizeTo(screen.availWidth, screen.availHeight);
31
29
  var argsData = {
32
- cancel: false, htmlContent: this.getHTMLContent(elements), name: beforePrint
30
+ cancel: false, htmlContent: this.getHTMLContent(treeMap, elements), name: beforePrint
33
31
  };
34
- this.control.trigger(beforePrint, argsData, function () {
32
+ treeMap.trigger(beforePrint, argsData, function () {
35
33
  if (!argsData.cancel) {
36
- printWindow(argsData.htmlContent, _this.printWindow);
34
+ printFunction(argsData.htmlContent, printWindow);
37
35
  }
38
36
  });
39
37
  };
@@ -44,7 +42,7 @@ var Print = /** @class */ (function () {
44
42
  * @returns {Element} - Returns the element
45
43
  * @private
46
44
  */
47
- Print.prototype.getHTMLContent = function (elements) {
45
+ Print.prototype.getHTMLContent = function (treeMap, elements) {
48
46
  var div = createElement('div');
49
47
  if (elements) {
50
48
  if (elements instanceof Array) {
@@ -60,7 +58,7 @@ var Print = /** @class */ (function () {
60
58
  }
61
59
  }
62
60
  else {
63
- div.appendChild(this.control.element.cloneNode(true));
61
+ div.appendChild(treeMap.element.cloneNode(true));
64
62
  }
65
63
  return div;
66
64
  };
@@ -74,17 +72,12 @@ var Print = /** @class */ (function () {
74
72
  return 'Print';
75
73
  };
76
74
  /**
77
- * To destroy the legend.
75
+ * To destroy the Print module.
78
76
  *
79
- * @param {TreeMap} treemap - Specifies the treemap instance
80
77
  * @returns {void}
81
78
  * @private
82
79
  */
83
- Print.prototype.destroy = function (treemap) {
84
- /**
85
- * Destroy method performed here
86
- */
87
- };
80
+ Print.prototype.destroy = function () { };
88
81
  return Print;
89
82
  }());
90
83
  export { Print };
@@ -155,6 +155,12 @@ var TreeMap = /** @class */ (function (_super) {
155
155
  remove(this.svgObject);
156
156
  }
157
157
  }
158
+ if (isNullOrUndefined(this.renderer)) {
159
+ this.renderer = new SvgRenderer(this.element.id);
160
+ }
161
+ if (isNullOrUndefined(this.layout)) {
162
+ this.layout = new LayoutPanel(this);
163
+ }
158
164
  this.clearTemplate();
159
165
  var containerWidth = this.element.clientWidth;
160
166
  var containerHeight = this.element.clientHeight;
@@ -237,6 +243,7 @@ var TreeMap = /** @class */ (function (_super) {
237
243
  var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
238
244
  var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
239
245
  element.setAttribute('aria-label', title.description || title.text);
246
+ element.setAttribute('role', '');
240
247
  element.setAttribute('tabindex', (this.tabIndex + (type === 'title' ? 1 : 2)).toString());
241
248
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
242
249
  height = (this.availableSize.height - titleBounds.y - titlePadding - this.margin.bottom);
@@ -414,7 +421,7 @@ var TreeMap = /** @class */ (function (_super) {
414
421
  */
415
422
  TreeMap.prototype.print = function (id) {
416
423
  if (this.allowPrint && this.printModule) {
417
- this.printModule.print(id);
424
+ this.printModule.print(this, id);
418
425
  }
419
426
  };
420
427
  /**
@@ -432,13 +439,13 @@ var TreeMap = /** @class */ (function (_super) {
432
439
  if (type === 'PDF' && this.allowPdfExport && this.pdfExportModule) {
433
440
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
434
441
  return new Promise(function (resolve, reject) {
435
- resolve(_this.pdfExportModule.export(type, fileName, orientation, allowDownload));
442
+ resolve(_this.pdfExportModule.export(_this, type, fileName, orientation, allowDownload));
436
443
  });
437
444
  }
438
445
  else if (this.allowImageExport && (type !== 'PDF') && this.imageExportModule) {
439
446
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
440
447
  return new Promise(function (resolve, reject) {
441
- resolve(_this.imageExportModule.export(type, fileName, allowDownload));
448
+ resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
442
449
  });
443
450
  }
444
451
  return null;
@@ -614,6 +621,7 @@ var TreeMap = /** @class */ (function (_super) {
614
621
  */
615
622
  TreeMap.prototype.addTabIndex = function () {
616
623
  this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
624
+ this.element.setAttribute('role', '');
617
625
  this.element.setAttribute('tabindex', this.tabIndex.toString());
618
626
  };
619
627
  /**
@@ -1114,6 +1122,7 @@ var TreeMap = /** @class */ (function (_super) {
1114
1122
  */
1115
1123
  TreeMap.prototype.destroy = function () {
1116
1124
  this.unWireEVents();
1125
+ removeElement('treeMapMeasureText');
1117
1126
  this.drilledItems = [];
1118
1127
  this.levelSelection = [];
1119
1128
  this.legendId = [];
@@ -37,11 +37,10 @@ export declare class TreeMapHighlight {
37
37
  /**
38
38
  * To destroy the hightlight.
39
39
  *
40
- * @param {TreeMap} treeMap - Specifies the instance of the treemap.
41
40
  * @returns {void}
42
41
  * @private
43
42
  */
44
- destroy(treeMap: TreeMap): void;
43
+ destroy(): void;
45
44
  }
46
45
  /**
47
46
  * Performing treemap selection
@@ -92,5 +91,5 @@ export declare class TreeMapSelection {
92
91
  * @returns {void}
93
92
  * @private
94
93
  */
95
- destroy(treeMap: TreeMap): void;
94
+ destroy(): void;
96
95
  }
@@ -197,12 +197,16 @@ var TreeMapHighlight = /** @class */ (function () {
197
197
  /**
198
198
  * To destroy the hightlight.
199
199
  *
200
- * @param {TreeMap} treeMap - Specifies the instance of the treemap.
201
200
  * @returns {void}
202
201
  * @private
203
202
  */
204
- TreeMapHighlight.prototype.destroy = function (treeMap) {
203
+ TreeMapHighlight.prototype.destroy = function () {
204
+ this.shapeElement = null;
205
+ this.shapeHighlightCollection = [];
206
+ this.legendHighlightCollection = [];
207
+ this.currentElement = [];
205
208
  this.removeEventListener();
209
+ this.treemap = null;
206
210
  };
207
211
  return TreeMapHighlight;
208
212
  }());
@@ -497,8 +501,12 @@ var TreeMapSelection = /** @class */ (function () {
497
501
  * @returns {void}
498
502
  * @private
499
503
  */
500
- TreeMapSelection.prototype.destroy = function (treeMap) {
504
+ TreeMapSelection.prototype.destroy = function () {
505
+ this.shapeElement = null;
506
+ this.shapeSelectionCollection = [];
507
+ this.legendSelectionCollection = [];
501
508
  this.removeEventListener();
509
+ this.treemap = null;
502
510
  };
503
511
  return TreeMapSelection;
504
512
  }());
@@ -31,9 +31,8 @@ export declare class TreeMapTooltip {
31
31
  /**
32
32
  * To destroy the tooltip.
33
33
  *
34
- * @param {TreeMap} treeMap - Specifies the instance of the treemap
35
34
  * @returns {void}
36
35
  * @private
37
36
  */
38
- destroy(treeMap: TreeMap): void;
37
+ destroy(): void;
39
38
  }
@@ -193,15 +193,17 @@ var TreeMapTooltip = /** @class */ (function () {
193
193
  /**
194
194
  * To destroy the tooltip.
195
195
  *
196
- * @param {TreeMap} treeMap - Specifies the instance of the treemap
197
196
  * @returns {void}
198
197
  * @private
199
198
  */
200
- TreeMapTooltip.prototype.destroy = function (treeMap) {
201
- /**
202
- * Destroy method performed here
203
- */
199
+ TreeMapTooltip.prototype.destroy = function () {
200
+ if (!isNullOrUndefined(this.svgTooltip)) {
201
+ this.svgTooltip.destroy();
202
+ }
203
+ this.svgTooltip = null;
204
+ this.tooltipSettings = null;
204
205
  this.removeEventListener();
206
+ this.treemap = null;
205
207
  };
206
208
  return TreeMapTooltip;
207
209
  }());