Created
September 8, 2021 12:34
-
-
Save sc1f/84077fabe54bd00bbfa8bce69daae780 to your computer and use it in GitHub Desktop.
Force all PerspectiveWidget configs to hide/show
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
%%javascript | |
// Select all PerspectiveWidget elements that are currently being displayed | |
const viewers = document.querySelectorAll("perspective-viewer"); | |
// Toggle the config for each one. This can be made more complex to show and hide specific configs for specific viewers, etc. | |
for (const viewer of viewers) viewer.toggleConfig() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment