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] Eraser Tool not working #1218

Open
simonbertoli opened this issue Apr 21, 2024 · 0 comments
Open

[Bug] Eraser Tool not working #1218

simonbertoli opened this issue Apr 21, 2024 · 0 comments

Comments

@simonbertoli
Copy link

simonbertoli commented Apr 21, 2024

Describe the Bug

The Eraser Tool is not working

Steps to Reproduce

  1. Install @cornerstonejs/tools^1.70.5
  2. Add changes to package outline here [Bug] @cornerstonejs/tools/dist/types/utilities/getViewportForAnnotation.d.ts:2:141 - error TS2307: Cannot find module 'packages/core/dist/types/types' or its corresponding type declarations. #1203 (comment) to avoid build error
  3. Add EraserToo, LengthTool and PlanarFreehandROITool
  4. Draw a Length Annotation, select the Eraser tool and select the Annotation
  5. Error appears in console log, screenshot below is from the Annotation Tools Stack at https://www.cornerstonejs.org/live-examples/stackannotationtools

Screenshot 2024-04-22 at 8 40 39 AM

If we just use the Length tool and do not add the PlanarFreehandROITool, the eraser works as expected. Once both tools have been loaded the error occurs

The current behavior

The annotation is not removed - getting the following error in the console

Uncaught TypeError: interactableAnnotations is not iterable at AnnotationEraserTool._deleteNearbyAnnotations (AnnotationEraserTool.ts:69:32) at AnnotationEraserTool.preMouseDownCallback (AnnotationEraserTool.ts:21:17)

The expected behavior

The annotation is removed and the is no error in the console.log

OS

MacOS 14.4.1

Node version

20.12.1

Browser

Brave 1.65.114

UPDATE

It looks as is const interactableAnnotations = loops through from the PlanarFreehandROITool but returns undefined as the annotation is from the Length tool, therefore causing the 'not iterable' error. If I add a freehand and a length annotation, the eraser tool works as expected.

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

No branches or pull requests

1 participant