fix(web): unstacking issues (#4792)

* Fix typo

* Restore asset store consistency after unstacking

* Fix aspect ratio after unstacking
This commit is contained in:
Sergey Kondrikov
2023-11-03 17:01:48 +03:00
committed by GitHub
parent 92bb42950e
commit 38443a6068
4 changed files with 9 additions and 7 deletions

View File

@@ -317,7 +317,7 @@ export class AssetStore {
return bucket.assets[Math.floor(Math.random() * bucket.assets.length)] || null;
}
updateAsset(_asset: AssetResponseDto) {
updateAsset(_asset: AssetResponseDto, recalculate = false) {
const asset = this.assets.find((asset) => asset.id === _asset.id);
if (!asset) {
return;
@@ -325,7 +325,7 @@ export class AssetStore {
Object.assign(asset, _asset);
this.emit(false);
this.emit(recalculate);
}
removeAssets(ids: string[]) {