From 188a18aa94766df184a7713cd7120808580a9678 Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Wed, 22 May 2024 20:17:16 +0800 Subject: [PATCH 1/2] feat: keep gear button on header --- .../Components/DockView/DockView.razor.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Extensions/Components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js b/src/Extensions/Components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js index 4ed38b49e1d..bf866dc8f80 100644 --- a/src/Extensions/Components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js +++ b/src/Extensions/Components/BootstrapBlazor.Dock/Components/DockView/DockView.razor.js @@ -41,6 +41,17 @@ export async function init(id, option, invoke) { tab.titleElement.append(gear); gear.classList.remove('d-none'); } + + const originalEvent = tab._dragStartEvent; + tab._dragStartEvent = function (x, y, dragListener, item) { + const gear = item.parentItem.element.querySelector(`[data-bb-componentId="${state.id}"]`) + if (gear) { + gear.classList.add('d-none'); + document.body.appendChild(gear); + } + + originalEvent(x, y, dragListener, item); + } } }); layout.on('stackCreated', stack => { From dcdde26298b21863ed6613ac473e1e3c3392d624 Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Wed, 22 May 2024 20:17:40 +0800 Subject: [PATCH 2/2] chore: bump version 8.1.4 --- .../Components/BootstrapBlazor.Dock/BootstrapBlazor.Dock.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extensions/Components/BootstrapBlazor.Dock/BootstrapBlazor.Dock.csproj b/src/Extensions/Components/BootstrapBlazor.Dock/BootstrapBlazor.Dock.csproj index c1116950f91..503b7fad9e3 100644 --- a/src/Extensions/Components/BootstrapBlazor.Dock/BootstrapBlazor.Dock.csproj +++ b/src/Extensions/Components/BootstrapBlazor.Dock/BootstrapBlazor.Dock.csproj @@ -1,7 +1,7 @@ - 8.1.3 + 8.1.4