Skip to content

Commit

Permalink
Merge pull request #859 from cornerstonejs/bidirectional
Browse files Browse the repository at this point in the history
fix(bidirectional): Trigger measurement modified event when getMeasurementLocationCallback is done
  • Loading branch information
dannyrb authored Feb 25, 2019
2 parents 0369c2c + 44ca8e2 commit af3f237
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tools/annotation/bidirectionalTool/addNewMeasurement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import external from './../../../externalModules.js';
import EVENTS from './../../../events.js';
import { moveNewHandle } from './../../../manipulators/index.js';
import anyHandlesOutsideImage from './../../../manipulators/anyHandlesOutsideImage.js';
import {
Expand All @@ -20,6 +21,15 @@ export default function(evt, interactionType) {
const doneCallback = () => {
measurementData.active = false;
external.cornerstone.updateImage(element);

// Trigger measurement modified event
const eventType = EVENTS.MEASUREMENT_MODIFIED;
const modifiedEventData = {
toolName: this.name,
element,
measurementData,
};
external.cornerstone.triggerEvent(element, eventType, modifiedEventData);
};

// Associate this data with this imageId so we can render it and manipulate it
Expand Down

0 comments on commit af3f237

Please sign in to comment.