Skip to content

Commit

Permalink
feat: Ensure AngleTool and ArrowAnnotateTool fire MEASUREMENT_COMPLET…
Browse files Browse the repository at this point in the history
…ED event (#1204)

Co-authored-by: Rodolfo Ladeira <[email protected]>
Co-authored-by: Danny Brown <[email protected]>
  • Loading branch information
3 people authored Apr 1, 2020
1 parent c9a6381 commit 24bca45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tools/annotation/AngleTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,18 @@ export default class AngleTool extends BaseAnnotationTool {
}

this.preventNewMeasurement = false;
external.cornerstone.updateImage(element);

const modifiedEventData = {
toolType: this.name,
element,
measurementData,
};
triggerEvent(
element,
EVENTS.MEASUREMENT_COMPLETED,
modifiedEventData
);
}
);
}
Expand Down
7 changes: 7 additions & 0 deletions src/tools/annotation/ArrowAnnotateTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ export default class ArrowAnnotateTool extends BaseAnnotationTool {
}

external.cornerstone.updateImage(element);

const modifiedEventData = {
toolType: this.name,
element,
measurementData,
};
triggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, modifiedEventData);
}
);
}
Expand Down

0 comments on commit 24bca45

Please sign in to comment.