@tetacom/ng-components 1.0.127 → 1.0.128

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.
@@ -10058,9 +10058,11 @@ class TableBodyComponent {
10058
10058
  this.activeRow = _;
10059
10059
  this._cdr.markForCheck();
10060
10060
  });
10061
+ this.addResizeObserver();
10061
10062
  }
10062
10063
  ngOnDestroy() {
10063
10064
  this._alive = false;
10065
+ this.removeResizeObserver();
10064
10066
  }
10065
10067
  getAggregateValue(column) {
10066
10068
  if (column.aggregate === AggregationType.sum) {
@@ -10100,6 +10102,16 @@ class TableBodyComponent {
10100
10102
  trackColumns(index, column) {
10101
10103
  return column.name;
10102
10104
  }
10105
+ addResizeObserver() {
10106
+ this._obs = new ResizeObserver((_) => {
10107
+ this.viewport?.checkViewportSize();
10108
+ });
10109
+ this._obs.observe(this._elementRef.nativeElement);
10110
+ }
10111
+ removeResizeObserver() {
10112
+ this._obs.unobserve(this._elementRef.nativeElement);
10113
+ this._obs.disconnect();
10114
+ }
10103
10115
  getSum(columnName) {
10104
10116
  return this.data?.reduce((accum, current) => {
10105
10117
  const val = parseFloat(current[columnName]);
@@ -10986,6 +10998,7 @@ class Chart3dComponent {
10986
10998
  }
10987
10999
  ngOnDestroy() {
10988
11000
  this._alive = false;
11001
+ this.removeResizeObserver();
10989
11002
  }
10990
11003
  init() {
10991
11004
  if (!this._scene) {
@@ -11081,6 +11094,10 @@ class Chart3dComponent {
11081
11094
  });
11082
11095
  this._obs.observe(this._elementRef.nativeElement);
11083
11096
  }
11097
+ removeResizeObserver() {
11098
+ this._obs.unobserve(this._elementRef.nativeElement);
11099
+ this._obs.disconnect();
11100
+ }
11084
11101
  makeSprite(text, opts) {
11085
11102
  const fontSize = 20;
11086
11103
  const canvas = document.createElement('canvas');