Skip to content

Some refactors and cleanups#426

Merged
floryst merged 4 commits intomainfrom
misc-fixes
Sep 19, 2023
Merged

Some refactors and cleanups#426
floryst merged 4 commits intomainfrom
misc-fixes

Conversation

@floryst
Copy link
Contributor

@floryst floryst commented Sep 19, 2023

Three minor refactors:

  • getOrigin() in pointState should use toRaw to reduce access overhead. getOrigin() usage should be considered readonly for the most part anyways, since in-place mutation isn't expected to trigger modified().
  • Creation of a point state interface for all point-based annotation tools.
  • useViewProxy<Mounted|Unmounted> has been renamed to onViewProxy<Mounted|Unmounted> for more consistent naming. They also now take MaybeRef<Maybe<ViewProxy>> instead of requiring the existence of the view proxy.

Any access to the tool origin via getOrigin should be considered
readonly. toRaw() will reduce the proxy overhead for accesses.
@floryst floryst requested a review from PaulHax September 19, 2023 16:22
Copy link
Collaborator

@PaulHax PaulHax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Are dragging handle's smoother now, or is that just in my head...

Base automatically changed from fix-widgets-after-layout to main September 19, 2023 18:26
@floryst floryst merged commit 9ff6990 into main Sep 19, 2023
@floryst floryst deleted the misc-fixes branch September 19, 2023 18:26
PaulHax pushed a commit to PaulHax/VolView that referenced this pull request Apr 24, 2025
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.

2 participants