Skip to content

Commit

Permalink
Edit Mode: Add side panel closing on profile change and mode closure
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
  • Loading branch information
ArturoManzoli committed Feb 6, 2025
1 parent 633cb59 commit b4d98d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/stores/widgetManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,13 @@ export const useWidgetManagerStore = defineStore('widget-manager', () => {
{ deep: true }
)

// Closes the side config panel on view change and edit mode exit
watch([editingMode, currentViewIndex], ([isInEditMode, newViewIdx], [, oldViewIdx]) => {
if (!isInEditMode || newViewIdx !== oldViewIdx) {
elementToShowOnDrawer.value = undefined
}
})

const isFullScreen = (widget: Widget): boolean => {
return isEqual(widget.position, fullScreenPosition) && isEqual(widget.size, fullScreenSize)
}
Expand Down

0 comments on commit b4d98d2

Please # to comment.