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

[Bug] A problem in ProbeTool affects the normal use of EraserTool. #1304

Closed
Steven-DD opened this issue Jun 5, 2024 · 2 comments · Fixed by #1721
Closed

[Bug] A problem in ProbeTool affects the normal use of EraserTool. #1304

Steven-DD opened this issue Jun 5, 2024 · 2 comments · Fixed by #1721
Assignees

Comments

@Steven-DD
Copy link

Describe the Bug

When using EraserTool, it does not correctly clear the markers generated by ProbeTool。

Steps to Reproduce

  1. using ProbeTool
  2. using EraserTool
  3. trying to delete probe markers

The current behavior

EraserTool not working,it does not correctly clear the markers

The expected behavior

EraserTool can correctly remove the markers.

Looking at the source code for ProbeTool I noticed a comment on lines 128-129, I'm wondering if there's a specific reason for this, if it doesn't have an effect I'll remove this code on the version I'm using

isPointNearTool is used in EraserTool, which needs to return a correct result, not like this

in ProbeTool
// Not necessary for this tool but needs to be defined since it's an abstract // method from the parent class. isPointNearTool(): boolean { return false; }

in EraserTool
for (const annotation of interactableAnnotations) { if ( toolInstance.isPointNearTool( element, annotation, currentPoints.canvas, 10, interactionType ) ) { annotationsToRemove.push(annotation.annotationUID); } } }

AnnotationEraserTool
ProbeTool.ts

OS

Windows 11

Node version

18

Browser

edge

@sedghi
Copy link
Member

sedghi commented Jun 6, 2024

I think i know what is going on

@sedghi sedghi self-assigned this Jun 6, 2024
@lqpmq90923
Copy link

Is there a solution now

@linear linear bot changed the title [Bug] A problem in ProbeTool affects the normal use of EraserTool. [Bug] A problem in ProbeTool affects the normal use of EraserTool. Nov 6, 2024
@sedghi sedghi removed their assignment Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment