LT-296: Bug fixing for jumping to measurements
This commit is contained in:
1 parent
7f0bd1bb42
commit
03dd8af731
3 files changed
+65
-55
No files matched your search
@@ -50,6 +50,24 @@ OHIF.measurements.activateMeasurements = (element, measurementData) => {
|
||||
// updated and the highlight is removed from inactive tools in all visible viewports
|
||||
const $viewports = $('.imageViewerViewport');
|
||||
$viewports.each((index, element) => {
|
||||
if (!$(element).find('canvas')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Implement isEnabledElement in Cornerstone
|
||||
// or maybe just remove the 'error' this throws?
|
||||
let ee;
|
||||
try {
|
||||
ee = cornerstone.getEnabledElement(element)
|
||||
} catch(error) {
|
||||
OHIF.log.warn(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ee.image) {
|
||||
return;
|
||||
}
|
||||
|
||||
cornerstone.updateImage(element)
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user