@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.
@@ -3338,28 +3338,30 @@ let TreeMap = class TreeMap extends Component {
3338
3338
  * @param e - Specifies the pointer event.
3339
3339
  */
3340
3340
  resizeOnTreeMap(e) {
3341
- this.isResize = true;
3342
- let args = {
3343
- name: resize,
3344
- cancel: false,
3345
- previousSize: this.availableSize,
3346
- currentSize: new Size(0, 0),
3347
- treemap: this
3348
- };
3349
- if (this.resizeTo) {
3350
- clearTimeout(this.resizeTo);
3351
- }
3352
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
3353
- this.resizeTo = setTimeout(() => {
3354
- this.unWireEVents();
3355
- this.createSvg();
3356
- this.refreshing = true;
3357
- this.wireEVents();
3358
- args.currentSize = this.availableSize;
3359
- this.trigger(resize, args, (observedArgs) => {
3360
- this.render();
3361
- });
3362
- }, 500);
3341
+ if (!this.isDestroyed) {
3342
+ this.isResize = true;
3343
+ let args = {
3344
+ name: resize,
3345
+ cancel: false,
3346
+ previousSize: this.availableSize,
3347
+ currentSize: new Size(0, 0),
3348
+ treemap: this
3349
+ };
3350
+ if (this.resizeTo) {
3351
+ clearTimeout(this.resizeTo);
3352
+ }
3353
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-treemap')) {
3354
+ this.resizeTo = setTimeout(() => {
3355
+ this.unWireEVents();
3356
+ this.createSvg();
3357
+ this.refreshing = true;
3358
+ this.wireEVents();
3359
+ args.currentSize = this.availableSize;
3360
+ this.trigger(resize, args, (observedArgs) => {
3361
+ this.render();
3362
+ });
3363
+ }, 500);
3364
+ }
3363
3365
  }
3364
3366
  }
3365
3367
  /**
@@ -3789,28 +3791,30 @@ let TreeMap = class TreeMap extends Component {
3789
3791
  * @private
3790
3792
  */
3791
3793
  onPropertyChanged(newProp, oldProp) {
3792
- let render = false;
3793
- for (const prop of Object.keys(newProp)) {
3794
- switch (prop) {
3795
- case 'background':
3796
- this.renderBorder();
3797
- break;
3798
- case 'height':
3799
- case 'width':
3800
- case 'layoutType':
3801
- case 'levels':
3802
- case 'drillDownView':
3803
- case 'renderDirection':
3804
- case 'leafItemSettings':
3805
- case 'legendSettings':
3806
- case 'dataSource':
3807
- render = true;
3808
- break;
3794
+ if (!this.isDestroyed) {
3795
+ let render = false;
3796
+ for (const prop of Object.keys(newProp)) {
3797
+ switch (prop) {
3798
+ case 'background':
3799
+ this.renderBorder();
3800
+ break;
3801
+ case 'height':
3802
+ case 'width':
3803
+ case 'layoutType':
3804
+ case 'levels':
3805
+ case 'drillDownView':
3806
+ case 'renderDirection':
3807
+ case 'leafItemSettings':
3808
+ case 'legendSettings':
3809
+ case 'dataSource':
3810
+ render = true;
3811
+ break;
3812
+ }
3813
+ }
3814
+ if (render) {
3815
+ this.createSvg();
3816
+ this.renderElements();
3809
3817
  }
3810
- }
3811
- if (render) {
3812
- this.createSvg();
3813
- this.renderElements();
3814
3818
  }
3815
3819
  }
3816
3820
  /**
@@ -5577,7 +5581,9 @@ class TreeMapTooltip {
5577
5581
  toolTipHeader = item['name'];
5578
5582
  value = item['weight'];
5579
5583
  toolTipData = item['data'];
5580
- markerFill = item['options']['fill'];
5584
+ if (!isNullOrUndefined(item['options'])) {
5585
+ markerFill = item['options']['fill'];
5586
+ }
5581
5587
  if (this.treemap.enableRtl) {
5582
5588
  tooltipContent = [textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) ||
5583
5589
  formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];