Skip to content

Commit

Permalink
fix triggering of 'ANNOTATION_ADDED' event multiple times (cornerston…
Browse files Browse the repository at this point in the history
  • Loading branch information
iamiota committed Apr 28, 2023
1 parent 2025556 commit 4e3f1c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/tools/src/stateManagement/annotation/annotationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ function addAnnotation(
// annotation added event for that element.
if (annotationGroupSelector instanceof HTMLDivElement) {
triggerAnnotationAddedForElement(annotation, annotationGroupSelector);
} else {
// if no element is provided, render all viewports that have the
// same frame of reference.
// Todo: we should do something else here for other types of annotation managers.
triggerAnnotationAddedForFOR(annotation);
}

// if no element is provided, render all viewports that have the
// same frame of reference.
// Todo: we should do something else here for other types of annotation managers.
triggerAnnotationAddedForFOR(annotation);

return annotation.annotationUID;
}

Expand Down

0 comments on commit 4e3f1c1

Please sign in to comment.