fix(ui): cancel transform/filter when deleting entity

This commit is contained in:
psychedelicious
2024-09-05 22:31:33 +10:00
parent b1e85f8b60
commit 96b74f4a79

View File

@@ -197,7 +197,13 @@ export abstract class CanvasEntityAdapterBase<
this.subscriptions.forEach((unsubscribe) => unsubscribe());
this.subscriptions.clear();
this.renderer.destroy();
if (this.transformer.$isTransforming.get()) {
this.transformer.stopTransform();
}
this.transformer.destroy();
if (this.manager.filter.$adapter.get()?.id === this.id) {
this.manager.filter.cancelFilter();
}
this.konva.layer.destroy();
this.manager.deleteAdapter(this.entityIdentifier);
};