Skip to content

[Bug] ANNOTATION_COMPLETED is not fired after drawing an annotation #2507

@brandonsoccer22

Description

@brandonsoccer22

Describe the Bug

The ANNOTATION_COMPLETED event (defined in packages/tools/src/enums/Events.ts) is not fired after an annotation is completed.

Steps to Reproduce

  1. Add the following code to packages/tools/examples/stackAnnotationToolsSpecificConfiguration/index.ts starting at line 59.
const allEvents = Object.values(csToolsEnums.Events);

function logEvent(evt: Event) {
  console.log('Event fired:', evt.type, evt);
}

allEvents.forEach((eventType) => {
  if(eventType !== csToolsEnums.Events.MOUSE_MOVE){
    element.addEventListener(eventType, logEvent);
  }
});
  1. Run yarn run example stackAnnotationToolsSpecificConfiguration

The current behavior

Draw an annotation. You will see that the CORNERSTONE_TOOLS_ANNOTATION_RENDERED is fired, but not the CORNERSTONE_TOOLS_ANNOTATION_COMPLETED event.

The expected behavior

The ANNOTATION_COMPLETED / CORNERSTONE_TOOLS_ANNOTATION_COMPLETED event should be fired available for me to listen to.

System Information

Chrome: 143.0.7499.40
Node 22

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions