From d128fd6bf0312cfc50f171d98c4083d3a36e2bc1 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 10 Dec 2019 17:41:43 -0300 Subject: [PATCH] Remove LabellingManager component --- platform/viewer/src/App.js | 6 +- ...LabellingManager.css => LabellingFlow.css} | 9 +-- .../src/components/Labelling/LabellingFlow.js | 42 ++++++++++++- .../components/Labelling/LabellingManager.js | 60 ------------------- 4 files changed, 45 insertions(+), 72 deletions(-) rename platform/viewer/src/components/Labelling/{LabellingManager.css => LabellingFlow.css} (89%) delete mode 100644 platform/viewer/src/components/Labelling/LabellingManager.js diff --git a/platform/viewer/src/App.js b/platform/viewer/src/App.js index b1cf92739..cde917e54 100644 --- a/platform/viewer/src/App.js +++ b/platform/viewer/src/App.js @@ -9,7 +9,7 @@ import { hot } from 'react-hot-loader/root'; import OHIFCornerstoneExtension from '@ohif/extension-cornerstone'; import ToolContextMenu from './connectedComponents/ToolContextMenu'; -import LabellingManager from './components/Labelling/LabellingManager'; +import LabellingFlow from './components/Labelling/LabellingFlow'; import { SnackbarProvider, @@ -182,7 +182,7 @@ class App extends Component { > { + const { editDescription, editLocation } = this.props; + + if (editDescription) { + measurementData.description = undefined; + } + + if (editLocation) { + measurementData.location = undefined; + } + }; + + descriptionDialogUpdate = description => { + this.props.updateLabelling({ description }); + this.props.labellingDoneCallback(); + }; + render() { + if (this.props.editDescriptionOnDialog) { + return ( + + ); + } + return ( - ); - } - - if (editLocation || this.props.editDescription) { - return ; - } - } - - treatMeasurementData = measurementData => { - const { editDescription, editLocation } = this.props; - - if (editDescription) { - measurementData.description = undefined; - } - - if (editLocation) { - measurementData.location = undefined; - } - }; - - descriptionDialogUpdate = description => { - this.props.updateLabelling({ description }); - this.props.labellingDoneCallback(); - }; -}