Keeping bidirectional arm selected after moving handles

This commit is contained in:
Bruno Alves de Faria 2017-11-21 13:22:54 -02:00
parent 10a6b2f094
commit 4dcff38a53
3 changed files with 16 additions and 8 deletions

View File

@ -1,24 +1,32 @@
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/measurements';
// import { OHIF } from 'meteor/ohif:core';
const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema;
const { CornerstoneHandleSchema } = MeasurementSchemaTypes;
const BidirectionalHandleSchema = new SimpleSchema([CornerstoneHandleSchema, {
selected: {
type: Boolean,
label: 'Selected',
optional: true,
defaultValue: false
}
}]);
const BidirectionalHandlesSchema = new SimpleSchema({
start: {
type: CornerstoneHandleSchema,
type: BidirectionalHandleSchema,
label: 'Start'
},
end: {
type: CornerstoneHandleSchema,
type: BidirectionalHandleSchema,
label: 'End'
},
perpendicularStart: {
type: CornerstoneHandleSchema,
type: BidirectionalHandleSchema,
label: 'Perpendicular Start'
},
perpendicularEnd: {
type: CornerstoneHandleSchema,
type: BidirectionalHandleSchema,
label: 'Perpendicular End'
},
textBox: {

View File

@ -149,7 +149,7 @@ const CornerstoneViewport = new SimpleSchema({
decimal: true,
optional: true
}
})
});
const InstanceLevelMeasurement = new SimpleSchema([
StudyLevelMeasurement,

View File

@ -113,7 +113,7 @@ class MeasurementHandlers {
}
// Clean the measurement according to the Schema
Collection._c2._simpleSchema.clean(measurement);
Collection._c2._simpleSchema.clean(_.clone(measurement));
// Insert the new measurement into the collection
Collection.update(measurementId, {