fix: remove image preview on image insertion (#9626)

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Marcel Mraz
2025-06-10 21:31:11 +02:00
committed by GitHub
parent 0d4abd1ddc
commit a7b64f02b3
17 changed files with 35 additions and 344 deletions

View File

@@ -694,14 +694,20 @@ export class AppStateDelta implements DeltaContainer<AppState> {
break;
case "croppingElementId": {
const croppingElementId = nextAppState[key];
const element =
croppingElementId && nextElements.get(croppingElementId);
if (element && !element.isDeleted) {
if (!croppingElementId) {
// previously there was a croppingElementId (assuming visible), now there is none
visibleDifferenceFlag.value = true;
} else {
nextAppState[key] = null;
const element = nextElements.get(croppingElementId);
if (element && !element.isDeleted) {
visibleDifferenceFlag.value = true;
} else {
nextAppState[key] = null;
}
}
break;
}
case "editingGroupId":