PWV-15: Creating routing branch
This commit is contained in:
1 parent
e618e32341
commit
efb4ca23b5
24 files changed
+158
-437
No files matched your search
@@ -6,8 +6,8 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
class MeasurementHandlers {
|
||||
|
||||
static onAdded(e, instance, eventData) {
|
||||
const { measurementApi } = instance.data;
|
||||
const measurementData = eventData.measurementData;
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const Collection = measurementApi.tools[eventData.toolType];
|
||||
|
||||
// Stop here if the tool data shall not be stored (e.g. temp tools)
|
||||
@@ -74,8 +74,8 @@ class MeasurementHandlers {
|
||||
}
|
||||
|
||||
static onModified(e, instance, eventData) {
|
||||
const { measurementApi } = instance.data;
|
||||
const measurementData = eventData.measurementData;
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const Collection = measurementApi.tools[eventData.toolType];
|
||||
|
||||
// Stop here if the tool data shall not be stored (e.g. temp tools)
|
||||
@@ -119,8 +119,7 @@ class MeasurementHandlers {
|
||||
OHIF.log.info('CornerstoneToolsMeasurementRemoved');
|
||||
const measurementData = eventData.measurementData;
|
||||
const measurementNumber = measurementData.measurementNumber;
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
const { measurementApi, timepointApi } = instance.data;
|
||||
const collection = measurementApi.tools[eventData.toolType];
|
||||
const measurementTypeId = measurementApi.toolsGroupsMap[measurementData.toolType];
|
||||
const measurement = collection.findOne(measurementData._id);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
const { InstanceMetadata, StudySummary } = Viewerbase.metadata;
|
||||
|
||||
@@ -11,9 +11,9 @@ const { InstanceMetadata, StudySummary } = Viewerbase.metadata;
|
||||
* @return {String|undefined} Timepoint type if found or undefined if not found or any error/missing information
|
||||
*/
|
||||
const getTimepointType = study => {
|
||||
const timepointApi = OHIF.viewer.timepointApi;
|
||||
const { timepointApi } = OHIF.viewer;
|
||||
|
||||
if (!timepointApi || !(study instanceof InstanceMetadata || study instanceof StudySummary) ) {
|
||||
if (!timepointApi || !(study instanceof InstanceMetadata || study instanceof StudySummary)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,17 +6,18 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
OHIF.measurements.toggleLabelButton = options => {
|
||||
const toolType = options.measurement.toolType;
|
||||
const measurementId = options.measurement._id;
|
||||
let buttonView = null;
|
||||
|
||||
const removeButtonView = () => {
|
||||
if (!options.instance.buttonView) {
|
||||
if (!buttonView) {
|
||||
return;
|
||||
}
|
||||
|
||||
Blaze.remove(options.instance.buttonView);
|
||||
options.instance.buttonView = null;
|
||||
Blaze.remove(buttonView);
|
||||
buttonView = null;
|
||||
};
|
||||
|
||||
if (options.instance.buttonView) {
|
||||
if (buttonView) {
|
||||
removeButtonView();
|
||||
}
|
||||
|
||||
@@ -53,6 +54,5 @@ OHIF.measurements.toggleLabelButton = options => {
|
||||
options.measurement.description = description;
|
||||
}
|
||||
};
|
||||
const view = Blaze.renderWithData(Template.measureFlow, data, options.element);
|
||||
options.instance.buttonView = view;
|
||||
buttonView = Blaze.renderWithData(Template.measureFlow, data, options.element);
|
||||
};
|
||||
Reference in new issue
Block a user