Add enable* functions for all togglable UI features#448
Merged
gjcope merged 3 commits intoSmithsonian:masterfrom Mar 26, 2026
Merged
Add enable* functions for all togglable UI features#448gjcope merged 3 commits intoSmithsonian:masterfrom
gjcope merged 3 commits intoSmithsonian:masterfrom
Conversation
added 2 commits
March 13, 2026 11:22
Adds enableAnnotations, enableReader, enableTours, enableTools and enableMeasurement to ExplorerApplication and MainView, mirroring the existing toggle* API with explicit boolean control and the same mutual-exclusion logic (annotations↔tools, tours↔reader).
Collaborator
|
Other than the naming question discussed in #385 my only other thought is that the toggle functions should be updated to use these functions internally for clarity. But I can do that after merging. |
Author
I've done that at first, but reverted it because I didn't know if it was a good idea. So I will redo it. |
- Rename enableAnnotations/Reader/Tours/Tools/Measurement to setAnnotationsEnabled/setReaderEnabled/setToursEnabled/setToolsEnabled/setMeasurementEnabled - Simplify all toggle* functions to read current state and delegate to their corresponding set*Enabled counterpart - Update API docs and toggles example accordingly
Collaborator
|
Looks great, thanks! Merged to rc-60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds explicit enable*(boolean) counterparts to the existing toggle* API for all togglable UI features.
Motivation:
The existing toggle* functions don't allow setting a feature to a specific state — they only flip the current state. This makes it difficult to use the API programmatically when you need to ensure a feature is visible before performing an action (e.g. ensuring annotations are visible before activating
one).
Changes:
Adds the following functions to ExplorerApplication and MainView:
Each function applies the same mutual-exclusion logic as its toggle* counterpart.