fix: remove duplicated deleteMeasurements code (#4895)
This commit is contained in:
parent
7f8fa1e1f4
commit
9bde644fce
@ -4,10 +4,7 @@ import {
|
|||||||
VolumeViewport,
|
VolumeViewport,
|
||||||
utilities as csUtils,
|
utilities as csUtils,
|
||||||
Types as CoreTypes,
|
Types as CoreTypes,
|
||||||
cache,
|
|
||||||
BaseVolumeViewport,
|
BaseVolumeViewport,
|
||||||
triggerEvent,
|
|
||||||
eventTarget,
|
|
||||||
} from '@cornerstonejs/core';
|
} from '@cornerstonejs/core';
|
||||||
import {
|
import {
|
||||||
ToolGroupManager,
|
ToolGroupManager,
|
||||||
@ -78,13 +75,10 @@ function commandsModule({
|
|||||||
colorbarService,
|
colorbarService,
|
||||||
hangingProtocolService,
|
hangingProtocolService,
|
||||||
syncGroupService,
|
syncGroupService,
|
||||||
toolbarService,
|
|
||||||
segmentationService,
|
segmentationService,
|
||||||
displaySetService,
|
displaySetService,
|
||||||
} = servicesManager.services as AppTypes.Services;
|
} = servicesManager.services as AppTypes.Services;
|
||||||
|
|
||||||
const { measurementServiceSource } = this;
|
|
||||||
|
|
||||||
function _getActiveViewportEnabledElement() {
|
function _getActiveViewportEnabledElement() {
|
||||||
return getActiveViewportEnabledElement(viewportGridService);
|
return getActiveViewportEnabledElement(viewportGridService);
|
||||||
}
|
}
|
||||||
@ -286,12 +280,6 @@ function commandsModule({
|
|||||||
? nearbyToolData
|
? nearbyToolData
|
||||||
: null;
|
: null;
|
||||||
},
|
},
|
||||||
/** Delete the given measurement */
|
|
||||||
deleteMeasurement: ({ uid }) => {
|
|
||||||
if (uid) {
|
|
||||||
measurementServiceSource.remove(uid);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Common logic for handling measurement label updates through dialog
|
* Common logic for handling measurement label updates through dialog
|
||||||
* @param uid - measurement uid
|
* @param uid - measurement uid
|
||||||
@ -1575,9 +1563,6 @@ function commandsModule({
|
|||||||
toggleViewportColorbar: {
|
toggleViewportColorbar: {
|
||||||
commandFn: actions.toggleViewportColorbar,
|
commandFn: actions.toggleViewportColorbar,
|
||||||
},
|
},
|
||||||
deleteMeasurement: {
|
|
||||||
commandFn: actions.deleteMeasurement,
|
|
||||||
},
|
|
||||||
setMeasurementLabel: {
|
setMeasurementLabel: {
|
||||||
commandFn: actions.setMeasurementLabel,
|
commandFn: actions.setMeasurementLabel,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Delete measurement',
|
label: 'Delete measurement',
|
||||||
commands: 'deleteMeasurement',
|
commands: 'removeMeasurement',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Add Label',
|
label: 'Add Label',
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default {
|
|||||||
label: 'Delete Measurement',
|
label: 'Delete Measurement',
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
commandName: 'deleteMeasurement',
|
commandName: 'removeMeasurement',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -34,3 +34,7 @@ After:
|
|||||||
yarn install
|
yarn install
|
||||||
yarn run dev
|
yarn run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## CommandsModule
|
||||||
|
|
||||||
|
1. Removed the `deleteMeasurements` command from the `CORNERSTONE` context. It should be replaced by `removeMeasurements` command.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user