-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Editable measurements #1545
Conversation
src/plugins/lib/ui/index.js
Outdated
vec[1] += fromRec.top - toRec.top; | ||
}; | ||
|
||
export function draggableDot3D(handleMouseEvents, handleTouchEvents, viewer, worldPos, color, ray2WorldPos, onStart, onMove, onEnd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please rename to createDraggableDot3D and use a parameter object (we try to avoid long argument lists just for style)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented by 72afa78
src/plugins/lib/ui/index.js
Outdated
}; | ||
}; | ||
|
||
export function activateDraggableDots(viewer, handleMouseEvents, handleTouchEvents, snapping, pointerLens, color, markers, onEdit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please use a parameter object here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented by 76590e8
This PR introduces components that enable users to interactively edit angle and distance measurements using both mouse and touch input.
Demos
The examples below showcase this feature using mouse input for both angle and distance measurements. Although not depicted here, editing is also supported for touch input.
In these examples, after creating a measurement, right-click on it to open a context menu, then select "Edit" to start editing.
Click and drag the measurement's endpoints to reposition them.
When you're done editing, right-click away from the measurement to open a context menu, then select "End Editing".
Distance measurement example
Angle measurement example