From fc3170a2ccbb9c2825e6ca751c4758713aadcdf5 Mon Sep 17 00:00:00 2001 From: "Kyuho (Kyu) Oh" <80994706+sixsage@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:16:01 -0800 Subject: [PATCH] Address Result Panel Getting Sticky Too Easily (#3136) ## Purpose Address #3042 There was an issue where visualization results were very easy to make panels "sticky", meaning the panels would be dragged even though the user is no longer holding down the mouse. This PR aims to fix this issue. ## Changes Add logic to modify the z-index of visualization results directly. If the panel is being dragged, the visualization result's z-index becomes -1, and if the panel is not dragged, the z-index changes back to 0 so that the user can interact with the visualization. ## Demo Before ![chrome_svDxLZYYvl](https://github.com/user-attachments/assets/8299e19d-9c66-4d9c-a40f-3fed8f7823be) After ![R3oNSHxH8J](https://github.com/user-attachments/assets/65069f65-3995-435a-88f6-d7cc5b66ddf1) --------- Co-authored-by: Xinyuan Lin --- .../result-panel/result-panel.component.html | 15 ++++++----- .../result-panel/result-panel.component.ts | 27 +++++++++++++++++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/core/gui/src/app/workspace/component/result-panel/result-panel.component.html b/core/gui/src/app/workspace/component/result-panel/result-panel.component.html index c707082f0cb..40169e1e069 100644 --- a/core/gui/src/app/workspace/component/result-panel/result-panel.component.html +++ b/core/gui/src/app/workspace/component/result-panel/result-panel.component.html @@ -39,6 +39,7 @@ [style.height.px]="height" (nzResize)="onResize($event)" [cdkDragFreeDragPosition]="dragPosition" + (cdkDragStarted)="handleStartDrag()" (cdkDragEnded)="handleEndDrag($event)">