Skip to content

refactor: consolidate symbol panel visibility state - #7

Open
kushagrabist wants to merge 1 commit into
52North:mainfrom
kushagrabist:fix/symbol-panel-state
Open

refactor: consolidate symbol panel visibility state#7
kushagrabist wants to merge 1 commit into
52North:mainfrom
kushagrabist:fix/symbol-panel-state

Conversation

@kushagrabist

Copy link
Copy Markdown

What changed

This PR removes the unused/redundant symbolPanelClosed$ observable from OpenLayersService and uses showSymbolPanel$ as the single source of truth for symbol panel visibility.

Replaced all usages of:

raiseSymbolPanelClosed(...)

with:

updateShowSymbolPanel({ visible: false })

Updated:

editing-toolbar.component.ts
layer-panel.component.ts
symbol-list.component.ts

Also renamed:

subsToSymbolPanelClosed

to:

subsToShowSymbolPanel

in map.component.ts since it now subscribes directly to the visibility state.

Why

symbolPanelClosed$ and showSymbolPanel$ were representing overlapping state. Since showSymbolPanel$ already indicates whether the panel is open or closed, the extra observable wasn’t needed.

This simplifies the visibility handling and avoids maintaining duplicate state.

Signed-off-by: kushagra <kushagrabist12@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant