fix(reference-lines): Update reference lines for the latest changes in cornerstone tools

This commit is contained in:
Evren Ozkan committed 2018-11-29 16:02:33 -05:00
1 parent c7565c7037
commit 5a4deedda8
3 files changed
+10 -4

No files matched your search

@@ -1,4 +1,5 @@
import { OHIF } from 'meteor/ohif:core';
import { cornerstone, cornerstoneTools } from 'meteor/ohif:cornerstone';
/**
* This function disables reference lines for a specific viewport element.
@@ -22,7 +23,7 @@ export function displayReferenceLines(element) {
const imagePlane = cornerstone.metaData.get('imagePlane', imageId);
// Disable reference lines for the current element
cornerstoneTools.referenceLines.tool.disable(element);
cornerstoneTools.setToolDisabledForElement(element, 'referenceLines');
if (!OHIF.viewer.refLinesEnabled || !imagePlane || !imagePlane.frameOfReferenceUID) {
OHIF.log.info('displayReferenceLines refLinesEnabled is not enabled, no imagePlane or no frameOfReferenceUID');
@@ -46,7 +47,9 @@ export function displayReferenceLines(element) {
return;
}
cornerstoneTools.referenceLines.tool.enable(viewportElement, OHIF.viewer.updateImageSynchronizer);
cornerstoneTools.setToolEnabledForElement(viewportElement, 'referenceLines', {
synchronizationContext: OHIF.viewer.updateImageSynchronizer
});
}
});
}