diff --git a/frontend/src/app/sessions/session/floating-window-manager/floating-window-manager.component.ts b/frontend/src/app/sessions/session/floating-window-manager/floating-window-manager.component.ts index debd6543e..d3e0cb55a 100644 --- a/frontend/src/app/sessions/session/floating-window-manager/floating-window-manager.component.ts +++ b/frontend/src/app/sessions/session/floating-window-manager/floating-window-manager.component.ts @@ -14,8 +14,6 @@ import { SessionViewerService, ViewerSession } from '../session-viewer.service'; }) @UntilDestroy() export class FloatingWindowManagerComponent implements OnInit { - draggingActive = false; - constructor(public sessionViewerService: SessionViewerService) {} ngOnInit(): void { @@ -25,11 +23,11 @@ export class FloatingWindowManagerComponent implements OnInit { } dragStart(): void { - this.draggingActive = true; + this.sessionViewerService.disableAllSessions(); } dragStop(): void { - this.draggingActive = false; + this.sessionViewerService.enableAllSessions(); } trackBySessionId(_: number, session: ViewerSession): string { diff --git a/frontend/src/app/sessions/session/session-iframe/session-iframe.component.html b/frontend/src/app/sessions/session/session-iframe/session-iframe.component.html index c304f291f..5e1a7283c 100644 --- a/frontend/src/app/sessions/session/session-iframe/session-iframe.component.html +++ b/frontend/src/app/sessions/session/session-iframe/session-iframe.component.html @@ -10,16 +10,19 @@ > diff --git a/frontend/src/app/sessions/session/session-viewer.service.ts b/frontend/src/app/sessions/session/session-viewer.service.ts index 8adc3df87..ba9566e98 100644 --- a/frontend/src/app/sessions/session/session-viewer.service.ts +++ b/frontend/src/app/sessions/session/session-viewer.service.ts @@ -74,6 +74,24 @@ export class SessionViewerService { this._sessions.next(updatedSessions); } + disableAllSessions(): void { + this._sessions.next( + this._sessions.value?.map((curSession) => ({ + ...curSession, + disabled: true, + })), + ); + } + + enableAllSessions(): void { + this._sessions.next( + this._sessions.value?.map((curSession) => ({ + ...curSession, + disabled: false, + })), + ); + } + resizeSessions(): void { document.querySelectorAll('iframe').forEach((iframe) => { const session = this._sessions.value?.find( @@ -137,4 +155,5 @@ export type ViewerSession = Session & { focused: boolean; reloadToResize: boolean; fullscreen: boolean; + disabled: boolean; }; diff --git a/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.html b/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.html index d516f4918..9731a877b 100644 --- a/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.html +++ b/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.html @@ -71,7 +71,7 @@
diff --git a/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.ts b/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.ts index a061060b8..16bbc48df 100644 --- a/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.ts +++ b/frontend/src/app/sessions/session/tiling-window-manager/tiling-window-manager.component.ts @@ -59,6 +59,7 @@ export class TilingWindowManagerComponent implements OnInit { } onMouseDown(event: MouseEvent, index: number): void { + this.sessionViewerService.disableAllSessions(); const leftSession = this.getSessionByIndex(index); const rightSession = this.getSessionByIndex(index + 1); @@ -91,6 +92,8 @@ export class TilingWindowManagerComponent implements OnInit { @HostListener('window:mouseup') onMouseUp(): void { if (this.isValidResizeState(this.resizeState)) { + // Only trigger if resize is active + this.sessionViewerService.enableAllSessions(); this.resizeState = {}; this.sessionViewerService.resizeSessions(); }