@syncfusion/ej2-treemap 20.2.45 → 20.3.56

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.
@@ -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
  }
@@ -59,7 +59,9 @@ var TreeMapTooltip = /** @class */ (function () {
59
59
  toolTipHeader = item['name'];
60
60
  value = item['weight'];
61
61
  toolTipData = item['data'];
62
- markerFill = item['options']['fill'];
62
+ if (!isNullOrUndefined(item['options'])) {
63
+ markerFill = item['options']['fill'];
64
+ }
63
65
  if (this.treemap.enableRtl) {
64
66
  tooltipContent = [textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) ||
65
67
  formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
@@ -193,15 +195,17 @@ var TreeMapTooltip = /** @class */ (function () {
193
195
  /**
194
196
  * To destroy the tooltip.
195
197
  *
196
- * @param {TreeMap} treeMap - Specifies the instance of the treemap
197
198
  * @returns {void}
198
199
  * @private
199
200
  */
200
- TreeMapTooltip.prototype.destroy = function (treeMap) {
201
- /**
202
- * Destroy method performed here
203
- */
201
+ TreeMapTooltip.prototype.destroy = function () {
202
+ if (!isNullOrUndefined(this.svgTooltip)) {
203
+ this.svgTooltip.destroy();
204
+ }
205
+ this.svgTooltip = null;
206
+ this.tooltipSettings = null;
204
207
  this.removeEventListener();
208
+ this.treemap = null;
205
209
  };
206
210
  return TreeMapTooltip;
207
211
  }());