Keeping bidirectional arm selected after moving handles
This commit is contained in:
parent
10a6b2f094
commit
4dcff38a53
@ -1,24 +1,32 @@
|
|||||||
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
||||||
import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/measurements';
|
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({
|
const BidirectionalHandlesSchema = new SimpleSchema({
|
||||||
start: {
|
start: {
|
||||||
type: CornerstoneHandleSchema,
|
type: BidirectionalHandleSchema,
|
||||||
label: 'Start'
|
label: 'Start'
|
||||||
},
|
},
|
||||||
end: {
|
end: {
|
||||||
type: CornerstoneHandleSchema,
|
type: BidirectionalHandleSchema,
|
||||||
label: 'End'
|
label: 'End'
|
||||||
},
|
},
|
||||||
perpendicularStart: {
|
perpendicularStart: {
|
||||||
type: CornerstoneHandleSchema,
|
type: BidirectionalHandleSchema,
|
||||||
label: 'Perpendicular Start'
|
label: 'Perpendicular Start'
|
||||||
},
|
},
|
||||||
perpendicularEnd: {
|
perpendicularEnd: {
|
||||||
type: CornerstoneHandleSchema,
|
type: BidirectionalHandleSchema,
|
||||||
label: 'Perpendicular End'
|
label: 'Perpendicular End'
|
||||||
},
|
},
|
||||||
textBox: {
|
textBox: {
|
||||||
|
|||||||
@ -149,7 +149,7 @@ const CornerstoneViewport = new SimpleSchema({
|
|||||||
decimal: true,
|
decimal: true,
|
||||||
optional: true
|
optional: true
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
const InstanceLevelMeasurement = new SimpleSchema([
|
const InstanceLevelMeasurement = new SimpleSchema([
|
||||||
StudyLevelMeasurement,
|
StudyLevelMeasurement,
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class MeasurementHandlers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clean the measurement according to the Schema
|
// 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
|
// Insert the new measurement into the collection
|
||||||
Collection.update(measurementId, {
|
Collection.update(measurementId, {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user