Skip to content
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

Merged
merged 8 commits into from
Jun 19, 2024
Merged

[FEATURE] Editable measurements #1545

merged 8 commits into from
Jun 19, 2024

Conversation

MichalDybizbanskiCreoox
Copy link
Collaborator

@MichalDybizbanskiCreoox MichalDybizbanskiCreoox commented Jun 18, 2024

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".

Screenshot from 2024-06-19 17-16-18

Screenshot from 2024-06-19 17-16-28

Screenshot from 2024-06-19 17-22-02

@MichalDybizbanskiCreoox MichalDybizbanskiCreoox changed the title Xeok 36 Edit Measurement XEOK-36 Edit Measurement Jun 18, 2024
src/plugins/AngleMeasurementsPlugin/index.js Show resolved Hide resolved
vec[1] += fromRec.top - toRec.top;
};

export function draggableDot3D(handleMouseEvents, handleTouchEvents, viewer, worldPos, color, ray2WorldPos, onStart, onMove, onEnd) {
Copy link
Member

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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Implemented by 72afa78

};
};

export function activateDraggableDots(viewer, handleMouseEvents, handleTouchEvents, snapping, pointerLens, color, markers, onEdit) {
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Implemented by 76590e8

@xeolabs xeolabs merged commit 734cae5 into master Jun 19, 2024
3 of 4 checks passed
@xeolabs xeolabs changed the title XEOK-36 Edit Measurement [FEATURE] Editable measurements Jun 19, 2024
@xeolabs xeolabs added this to the 2.6.0 milestone Jun 19, 2024
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