Skip to content

Commit

Permalink
Merge pull request #24 from ctinnovation/fix/memory-leaks
Browse files Browse the repository at this point in the history
fix: rollback isEqual
  • Loading branch information
giovanni-bertoncelli authored Mar 7, 2024
2 parents 2acef6e + b877db0 commit 4ea6e84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 0 additions & 5 deletions projects/ngx-konva/src/lib/components/ko-image.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Optional, Output } from '@angular/core';
import { ImageConfig, Image as KonvaImage } from 'konva/lib/shapes/Image';
import { isEqual } from 'lodash';
import { KoShape } from '../common';
import { KoNestable, KoNestableConfig } from '../common/ko-nestable';
import { KoGroupComponent } from './ko-group.component';
Expand Down Expand Up @@ -38,10 +37,6 @@ export class KoImageComponent extends KoNestable implements OnInit {
};
@Input()
set config(c: KoNestableConfig) {
if (isEqual(this._config, c)) {
return;
}

this._config = c;
this._config['id'] = this.id;
this.updateShape();
Expand Down
5 changes: 0 additions & 5 deletions projects/ngx-konva/src/lib/components/ko-shape.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, ElementRef, EventEmitter, Input, OnInit, Optional, Output } from '@angular/core';
import { isEqual } from 'lodash';
import { KoShape, KoShapeConfig, KoShapeSelectors, koShapeTypesMap } from '../common';
import { KoNestable } from '../common/ko-nestable';
import { KoGroupComponent } from './ko-group.component';
Expand All @@ -22,10 +21,6 @@ export class KoShapeComponent extends KoNestable implements OnInit {
};
@Input()
set config(c: KoShapeConfig) {
if (isEqual(c, this._config)) {
return;
}

this._config = c;
this._config.id = this.id;
this.updateShape();
Expand Down
3 changes: 3 additions & 0 deletions unreleased/BAC-926.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Removed

- Removed `isEqual` comparison in config setter

0 comments on commit 4ea6e84

Please sign in to comment.