Skip to content

Commit

Permalink
Merge pull request #5182 from systeminit/fix/ensure-zindex-when-delet…
Browse files Browse the repository at this point in the history
…ing-components

Fix: ensure z-index for frames when deleting/updating/adding components
  • Loading branch information
fnichol authored Dec 20, 2024
2 parents 609679a + 99d9c0d commit 7a8bc8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/web/src/store/views.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
groups,
views,
});
this.setGroupZIndex();
this.selectView(response.view.id);
},
});
Expand Down Expand Up @@ -1747,9 +1748,9 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
size: finalGeo.width * finalGeo.height,
zIndex: 0,
};
this.setGroupZIndex();
}
});
this.setGroupZIndex();

if (this.selectedComponentId === data.component.id) {
if (data.component.changeStatus !== "deleted")
Expand Down Expand Up @@ -1778,6 +1779,7 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
delete view?.components[data.componentId];
delete view?.groups[data.componentId];
});
this.setGroupZIndex();

// remove invalid component IDs from the selection
const validComponentIds = _.intersection(
Expand Down

0 comments on commit 7a8bc8b

Please sign in to comment.