cornerstone3D
cornerstone3D copied to clipboard
[Bug] A problem in ProbeTool affects the normal use of EraserTool.
Describe the Bug
When using EraserTool, it does not correctly clear the markers generated by ProbeTool。
Steps to Reproduce
- using ProbeTool
- using EraserTool
- 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
I think i know what is going on
Is there a solution now