Handle for interaction outside of the ViewportDialog (default to cancel)
This commit is contained in:
1 parent
9403a091d9
commit
a0b0f365dd
7 files changed
+64
-7
No files matched your search
+4
@@ -50,6 +50,10 @@ function _askTrackMeasurements(UIViewportDialogService, viewportIndex) {
|
||||
message,
|
||||
actions,
|
||||
onSubmit,
|
||||
onOutsideClick: () => {
|
||||
UIViewportDialogService.hide();
|
||||
resolve(RESPONSE.CANCEL);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+9
-1
@@ -63,6 +63,10 @@ function _askShouldAddMeasurements(UIViewportDialogService, viewportIndex) {
|
||||
message,
|
||||
actions,
|
||||
onSubmit,
|
||||
onOutsideClick: () => {
|
||||
UIViewportDialogService.hide();
|
||||
resolve(RESPONSE.CANCEL);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -91,10 +95,14 @@ function _askSaveDiscardOrCancel(UIViewportDialogService, viewportIndex) {
|
||||
|
||||
UIViewportDialogService.show({
|
||||
viewportIndex,
|
||||
type: 'info', // TODO: warn
|
||||
type: 'warning',
|
||||
message,
|
||||
actions,
|
||||
onSubmit,
|
||||
onOutsideClick: () => {
|
||||
UIViewportDialogService.hide();
|
||||
resolve(RESPONSE.CANCEL);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+9
-1
@@ -57,6 +57,10 @@ function _askTrackMeasurements(UIViewportDialogService, viewportIndex) {
|
||||
message,
|
||||
actions,
|
||||
onSubmit,
|
||||
onOutsideClick: () => {
|
||||
UIViewportDialogService.hide();
|
||||
resolve(RESPONSE.CANCEL);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -85,10 +89,14 @@ function _askSaveDiscardOrCancel(UIViewportDialogService, viewportIndex) {
|
||||
|
||||
UIViewportDialogService.show({
|
||||
viewportIndex,
|
||||
type: 'info', // TODO: warn
|
||||
type: 'warning',
|
||||
message,
|
||||
actions,
|
||||
onSubmit,
|
||||
onOutsideClick: () => {
|
||||
UIViewportDialogService.hide();
|
||||
resolve(RESPONSE.CANCEL);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -277,6 +277,7 @@ function TrackedCornerstoneViewport({
|
||||
type={viewportDialogState.type}
|
||||
actions={viewportDialogState.actions}
|
||||
onSubmit={viewportDialogState.onSubmit}
|
||||
onOutsideClick={viewportDialogState.onOutsideClick}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user