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