fix(measurement label auto-completion): Customization of measurement label auto-completion fails for measurements following arrow annotations. (#4739)
This commit is contained in:
1 parent
43aa20c372
commit
e035ef1dcc
6 files changed
+73
-81
No files matched your search
@@ -61,7 +61,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
const { toolNames, Enums } = utilityModule.exports;
|
||||
|
||||
// Init Default and SR ToolGroups
|
||||
initToolGroups(toolNames, Enums, toolGroupService, commandsManager, null, servicesManager);
|
||||
initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
|
||||
|
||||
const { unsubscribe } = toolGroupService.subscribe(
|
||||
toolGroupService.EVENTS.VIEWPORT_ADDED,
|
||||
|
||||
@@ -6,7 +6,7 @@ export const toolGroupIds = {
|
||||
default: 'default',
|
||||
};
|
||||
|
||||
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
||||
const tools = {
|
||||
active: [
|
||||
{
|
||||
@@ -32,23 +32,17 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
|
||||
toolName: toolNames.ArrowAnnotate,
|
||||
configuration: {
|
||||
getTextCallback: (callback, eventDetails) => {
|
||||
if (modeLabelConfig) {
|
||||
callback(' ');
|
||||
} else {
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
});
|
||||
}
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
});
|
||||
},
|
||||
changeTextCallback: (data, eventDetails, callback) => {
|
||||
if (modeLabelConfig === undefined) {
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
});
|
||||
}
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -180,8 +174,8 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
||||
}
|
||||
|
||||
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
|
||||
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
||||
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
|
||||
}
|
||||
|
||||
export default initToolGroups;
|
||||
Reference in new issue
Block a user