@ohif/extension-cornerstone 3.14.0-beta.107 → 3.14.0-beta.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohif/extension-cornerstone",
3
- "version": "3.14.0-beta.107",
3
+ "version": "3.14.0-beta.109",
4
4
  "description": "OHIF extension for Cornerstone",
5
5
  "author": "OHIF",
6
6
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  "@cornerstonejs/codec-openjpeg": "1.3.2",
37
37
  "@cornerstonejs/codec-openjph": "2.4.9",
38
38
  "@cornerstonejs/dicom-image-loader": "5.19.7",
39
- "@ohif/core": "3.14.0-beta.107",
40
- "@ohif/extension-default": "3.14.0-beta.107",
41
- "@ohif/ui-next": "3.14.0-beta.107",
39
+ "@ohif/core": "3.14.0-beta.109",
40
+ "@ohif/extension-default": "3.14.0-beta.109",
41
+ "@ohif/ui-next": "3.14.0-beta.109",
42
42
  "dcmjs": "0.52.0",
43
43
  "dicom-parser": "1.8.21",
44
44
  "hammerjs": "2.0.8",
@@ -1049,6 +1049,11 @@ function commandsModule({
1049
1049
  arrowTextCallback: async ({ callback, data }) => {
1050
1050
  const labelConfig = customizationService.getCustomization('measurementLabels');
1051
1051
  const renderContent = customizationService.getCustomization('ui.labellingComponent');
1052
+ // ArrowAnnotateTool removes a just-drawn annotation when its text
1053
+ // callback returns a falsy label. Saving an empty label should keep
1054
+ // the arrow (same as Cancel), so skip the callback for new
1055
+ // annotations (no `data` means the annotation is new, not edited).
1056
+ const isNewAnnotation = !data;
1052
1057
 
1053
1058
  if (!labelConfig) {
1054
1059
  const label = await callInputDialog({
@@ -1058,6 +1063,9 @@ function commandsModule({
1058
1063
  defaultValue: data?.data?.label || '',
1059
1064
  });
1060
1065
 
1066
+ if (isNewAnnotation && !label) {
1067
+ return;
1068
+ }
1061
1069
  callback?.(label);
1062
1070
  return;
1063
1071
  }
@@ -1067,6 +1075,9 @@ function commandsModule({
1067
1075
  labelConfig,
1068
1076
  renderContent,
1069
1077
  });
1078
+ if (isNewAnnotation && !value) {
1079
+ return;
1080
+ }
1070
1081
  callback?.(value);
1071
1082
  },
1072
1083