From a786dec9c1a73ae703df2b30ee541422f07e7de4 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 10 Jun 2025 10:23:28 +0200 Subject: [PATCH] fix(Dashboard grid):emit dragged item on resize and adjust z-index for overlay and dragged item --- public/css/components/dashboard.css | 15 +++++++-------- public/js/components/Drop/Grid.js | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/css/components/dashboard.css b/public/css/components/dashboard.css index b4c82254f..beb5b649c 100644 --- a/public/css/components/dashboard.css +++ b/public/css/components/dashboard.css @@ -38,13 +38,6 @@ cursor:pointer; } -.draggedItem { - height: 100%; - width: 100%; - background-color:white; - position:relative; -} - .dashboard-section > .newGridRow{ position:absolute; width:20px; @@ -128,6 +121,13 @@ cursor: move; } +.draggedItem { + height: 100%; + width: 100%; + background-color: white; + position: relative; +} + .dashboard-item-overlay::before{ position:absolute; content:""; @@ -137,7 +137,6 @@ bottom:0; background-color:rgba(0, 100, 156); border:4px dashed lightgray; - z-index: 2; opacity: 0.5; } diff --git a/public/js/components/Drop/Grid.js b/public/js/components/Drop/Grid.js index 1ecdd29ae..00ffe7c52 100644 --- a/public/js/components/Drop/Grid.js +++ b/public/js/components/Drop/Grid.js @@ -425,6 +425,7 @@ export default { return; this.mode = MODE_RESIZE; this.draggedItem = item; + this.$emit('draggedItem', item); this._dragStart(evt); }, dragOver(evt) { @@ -627,7 +628,7 @@ export default { class="position-absolute" :active="active" :style="{ - zIndex: item.resizeOverlay ? -5 : 'auto', + zIndex: item.resizeOverlay ? 1 : 2, top: 'calc(' + item.y + ' * var(--fhc-dg-row-height))', left: 'calc(' + item.x + ' * var(--fhc-dg-col-width))', width: 'calc(' + item.w + ' * var(--fhc-dg-col-width))',