Skip to content

fix(ruler): avoid error when manipulator returns no worldCoords#474

Merged
floryst merged 2 commits intoKitware:mainfrom
PaulHax:tool-fix
Oct 27, 2023
Merged

fix(ruler): avoid error when manipulator returns no worldCoords#474
floryst merged 2 commits intoKitware:mainfrom
PaulHax:tool-fix

Conversation

@PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Oct 27, 2023

Seems that Paint is hurting too...

@netlify
Copy link

netlify bot commented Oct 27, 2023

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e670b7d
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/653c0cca7207b90008dece8b
😎 Deploy Preview https://deploy-preview-474--volview-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@floryst
Copy link
Contributor

floryst commented Oct 27, 2023

This looks to be an oversight on how we use worldCoords after the vtk.js@v28 upgrade.

Seems that Paint is hurting too...

It sounds like all of the widgets need to be checked for their usage of handleEvent and worldCoords handling. If paint (and others) are having issues, please also add those fixes to this PR.

Copy link
Contributor

@floryst floryst left a comment

Choose a reason for hiding this comment

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

Overall LGTM

const worldCoords = getWorldCoords(eventData);

if (!worldCoords) {
console.warn('Event cannot be converted to world coordinates');
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant console.warn

Comment on lines +51 to +52
if (!worldCoords)
console.warn('Event cannot be converted to world coordinates');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think our current manipulators shouldn't trigger this unless there's an error case, so this is a good add. If we start getting them legitimately, then we can remove it.

@floryst
Copy link
Contributor

floryst commented Oct 27, 2023

LGTM!

@floryst floryst merged commit a695eb7 into Kitware:main Oct 27, 2023
PaulHax pushed a commit to PaulHax/VolView that referenced this pull request Apr 24, 2025
fix(ruler): avoid error when manipulator returns no worldCoords
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