fix(ArrowAnnotate): Allow free-form text for arrow annotations (#5259)
This commit is contained in:
1 parent
4e6530d1d8
commit
3c8446a5e5
17 files changed
+156
-11
No files matched your search
@@ -637,10 +637,22 @@ function commandsModule({
|
||||
|
||||
viewportGridService.setActiveViewportId(viewportId);
|
||||
},
|
||||
arrowTextCallback: async ({ callback }) => {
|
||||
arrowTextCallback: async ({ callback, data }) => {
|
||||
const labelConfig = customizationService.getCustomization('measurementLabels');
|
||||
const renderContent = customizationService.getCustomization('ui.labellingComponent');
|
||||
|
||||
if (!labelConfig) {
|
||||
const label = await callInputDialog({
|
||||
uiDialogService,
|
||||
title: 'Edit Arrow Text',
|
||||
placeholder: data?.data?.label || 'Enter new text',
|
||||
defaultValue: data?.data?.label || '',
|
||||
});
|
||||
|
||||
callback?.(label);
|
||||
return;
|
||||
}
|
||||
|
||||
const value = await callInputDialogAutoComplete({
|
||||
uiDialogService,
|
||||
labelConfig,
|
||||
|
||||
@@ -409,10 +409,6 @@ const connectMeasurementServiceToTools = ({
|
||||
setAnnotationLabel(sourceAnnotation, element, label);
|
||||
}
|
||||
|
||||
if (metadata.toolName === 'ArrowAnnotate') {
|
||||
data.text = label;
|
||||
}
|
||||
|
||||
// update the isLocked state
|
||||
annotation.locking.setAnnotationLocked(uid, isLocked);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ const ArrowAnnotate = {
|
||||
frameNumber: mappedAnnotations[0]?.frameNumber || 1,
|
||||
toolName: metadata.toolName,
|
||||
displaySetInstanceUID: displaySet.displaySetInstanceUID,
|
||||
label: data.text,
|
||||
label: data.label,
|
||||
displayText: displayText,
|
||||
data: data.cachedStats,
|
||||
type: getValueTypeFromToolType(toolName),
|
||||
|
||||
Reference in new issue
Block a user