* feat: Context menu feat: Custom context menu Adding documentation PR updates * fix: Capture tool exception * PR updates * Add fully worked out examples in the basic test mode/extension * Fix the menu display * fix: Make the commands on clicks much more configurable * Wait for load before double clicking * docs * PR changes - nothing functional, just moving things endlessly * PR comments * PR changes - rename the default context menu * Renamed the cornerstoneContextMenu to measurementsContextMenu * Add chevron right to the sub-menus
32 lines
716 B
TypeScript
32 lines
716 B
TypeScript
const defaultContextMenu = {
|
|
id: 'measurementsContextMenu',
|
|
customizationType: 'ohif.contextMenu',
|
|
menus: [
|
|
// Get the items from the UI Customization for the menu name (and have a custom name)
|
|
{
|
|
id: 'forExistingMeasurement',
|
|
selector: ({ nearbyToolData }) => !!nearbyToolData,
|
|
items: [
|
|
{
|
|
label: 'Delete measurement',
|
|
commands: [
|
|
{
|
|
commandName: 'deleteMeasurement',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Add Label',
|
|
commands: [
|
|
{
|
|
commandName: 'setMeasurementLabel',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|
|
|
|
export default defaultContextMenu;
|