@syncfusion/ej2-treemap 20.3.47 → 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.
@@ -3467,28 +3467,30 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3467
3467
  */
3468
3468
  TreeMap.prototype.resizeOnTreeMap = function (e) {
3469
3469
  var _this = this;
3470
- this.isResize = true;
3471
- var args = {
3472
- name: resize,
3473
- cancel: false,
3474
- previousSize: this.availableSize,
3475
- currentSize: new Size(0, 0),
3476
- treemap: this
3477
- };
3478
- if (this.resizeTo) {
3479
- clearTimeout(this.resizeTo);
3480
- }
3481
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
3482
- this.resizeTo = setTimeout(function () {
3483
- _this.unWireEVents();
3484
- _this.createSvg();
3485
- _this.refreshing = true;
3486
- _this.wireEVents();
3487
- args.currentSize = _this.availableSize;
3488
- _this.trigger(resize, args, function (observedArgs) {
3489
- _this.render();
3490
- });
3491
- }, 500);
3470
+ if (!this.isDestroyed) {
3471
+ this.isResize = true;
3472
+ var args_1 = {
3473
+ name: resize,
3474
+ cancel: false,
3475
+ previousSize: this.availableSize,
3476
+ currentSize: new Size(0, 0),
3477
+ treemap: this
3478
+ };
3479
+ if (this.resizeTo) {
3480
+ clearTimeout(this.resizeTo);
3481
+ }
3482
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
3483
+ this.resizeTo = setTimeout(function () {
3484
+ _this.unWireEVents();
3485
+ _this.createSvg();
3486
+ _this.refreshing = true;
3487
+ _this.wireEVents();
3488
+ args_1.currentSize = _this.availableSize;
3489
+ _this.trigger(resize, args_1, function (observedArgs) {
3490
+ _this.render();
3491
+ });
3492
+ }, 500);
3493
+ }
3492
3494
  }
3493
3495
  };
3494
3496
  /**
@@ -3922,29 +3924,31 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
3922
3924
  * @private
3923
3925
  */
3924
3926
  TreeMap.prototype.onPropertyChanged = function (newProp, oldProp) {
3925
- var render = false;
3926
- for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
3927
- var prop = _a[_i];
3928
- switch (prop) {
3929
- case 'background':
3930
- this.renderBorder();
3931
- break;
3932
- case 'height':
3933
- case 'width':
3934
- case 'layoutType':
3935
- case 'levels':
3936
- case 'drillDownView':
3937
- case 'renderDirection':
3938
- case 'leafItemSettings':
3939
- case 'legendSettings':
3940
- case 'dataSource':
3941
- render = true;
3942
- break;
3927
+ if (!this.isDestroyed) {
3928
+ var render = false;
3929
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
3930
+ var prop = _a[_i];
3931
+ switch (prop) {
3932
+ case 'background':
3933
+ this.renderBorder();
3934
+ break;
3935
+ case 'height':
3936
+ case 'width':
3937
+ case 'layoutType':
3938
+ case 'levels':
3939
+ case 'drillDownView':
3940
+ case 'renderDirection':
3941
+ case 'leafItemSettings':
3942
+ case 'legendSettings':
3943
+ case 'dataSource':
3944
+ render = true;
3945
+ break;
3946
+ }
3947
+ }
3948
+ if (render) {
3949
+ this.createSvg();
3950
+ this.renderElements();
3943
3951
  }
3944
- }
3945
- if (render) {
3946
- this.createSvg();
3947
- this.renderElements();
3948
3952
  }
3949
3953
  };
3950
3954
  /**
@@ -5727,7 +5731,9 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
5727
5731
  toolTipHeader = item['name'];
5728
5732
  value = item['weight'];
5729
5733
  toolTipData = item['data'];
5730
- markerFill = item['options']['fill'];
5734
+ if (!isNullOrUndefined(item['options'])) {
5735
+ markerFill = item['options']['fill'];
5736
+ }
5731
5737
  if (this.treemap.enableRtl) {
5732
5738
  tooltipContent = [textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) ||
5733
5739
  formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];