Fix widgets not rendering after relayout#425
Merged
Conversation
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PaulHax
reviewed
Sep 19, 2023
PaulHax
reviewed
Sep 19, 2023
Collaborator
PaulHax
left a comment
There was a problem hiding this comment.
Better but still not seeing interactive widgets after switching layouts to a view that was hidden before.
Switching tool types makes existing tools ineractive again.
Adds a useWidgetVisibility composable that invokes a view render after rendering the widgets.
Mounted needs to wait for the container to have non-zero size. Unmounted needs to be triggered on component unmount, since the watcher is stopped during unmounting.
Tools should be waiting for the view proxy to be mounted and ready, rather than the component.
e9e5b7d to
995963b
Compare
Contributor
Author
|
Please try again. I fixed an issue where the widgets were being added to a view of 0,0 size, which prevented proper rendering of pixel-scaled representations. |
Collaborator
|
Fixed now! Devious bug, I was scratching my head there. |
PaulHax
pushed a commit
to PaulHax/VolView
that referenced
this pull request
Apr 24, 2025
Fix widgets not rendering after relayout
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.
Fixes #424. The views weren't requesting a render after layout changes. I also created a
useWidgetVisibilitycomposable to encapsulate this behavior.I also cleaned up toolId prop usage by directly using the prop and typing the toolId to be
PropType<ToolID>.