feat(multimonitor): Add simple multi-monitor support to open another study(#4178)
This commit is contained in:
1 parent
a4a6de07f4
commit
07c628e689
49 files changed
+1476
-367
No files matched your search
@@ -47,15 +47,22 @@ export default class ContextMenuController {
|
||||
}
|
||||
|
||||
const { event, subMenu, menuId, menus, selectorProps } = contextMenuProps;
|
||||
if (!menus) {
|
||||
console.warn('No menus found for', menuId);
|
||||
return;
|
||||
}
|
||||
|
||||
const { locking, visibility } = CsAnnotation;
|
||||
const targetAnnotationId = selectorProps?.nearbyToolData?.annotationUID as string;
|
||||
const isLocked = locking.isAnnotationLocked(targetAnnotationId);
|
||||
const isVisible = visibility.isAnnotationVisible(targetAnnotationId);
|
||||
|
||||
if (isLocked || !isVisible) {
|
||||
console.warn(`Annotation is ${isLocked ? 'locked' : 'not visible'}.`);
|
||||
return;
|
||||
if (targetAnnotationId) {
|
||||
const isLocked = locking.isAnnotationLocked(targetAnnotationId);
|
||||
const isVisible = visibility.isAnnotationVisible(targetAnnotationId);
|
||||
|
||||
if (isLocked || !isVisible) {
|
||||
console.warn(`Annotation is ${isLocked ? 'locked' : 'not visible'}.`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const items = ContextMenuItemsBuilder.getMenuItems(
|
||||
@@ -73,7 +80,7 @@ export default class ContextMenuController {
|
||||
preventCutOf: true,
|
||||
defaultPosition: ContextMenuController._getDefaultPosition(
|
||||
defaultPointsPosition,
|
||||
event?.detail,
|
||||
event?.detail || event,
|
||||
viewportElement
|
||||
),
|
||||
event,
|
||||
@@ -89,7 +96,7 @@ export default class ContextMenuController {
|
||||
menus,
|
||||
event,
|
||||
subMenu,
|
||||
eventData: event?.detail,
|
||||
eventData: event?.detail || event,
|
||||
|
||||
onClose: () => {
|
||||
this.services.uiDialogService.dismiss({ id: 'context-menu' });
|
||||
@@ -136,8 +143,8 @@ export default class ContextMenuController {
|
||||
};
|
||||
|
||||
static _getEventDefaultPosition = eventDetail => ({
|
||||
x: eventDetail && eventDetail.currentPoints.client[0],
|
||||
y: eventDetail && eventDetail.currentPoints.client[1],
|
||||
x: eventDetail?.currentPoints?.client[0] ?? eventDetail?.pageX,
|
||||
y: eventDetail?.currentPoints?.client[1] ?? eventDetail?.pageY,
|
||||
});
|
||||
|
||||
static _getElementDefaultPosition = element => {
|
||||
|
||||
Reference in new issue
Block a user