From c49b6247137df0d720c0ca54774ffb48b218541d Mon Sep 17 00:00:00 2001 From: zhaijunlei <276318515@qq.com> Date: Wed, 7 May 2025 09:44:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?release=EF=BC=9A=20dockview=20update=20to?= =?UTF-8?q?=20v4.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/css/dockview.css | 140 +++++++++--------- .../wwwroot/js/dockview-core.esm.js | 16 +- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css b/src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css index 4de6b4e3..7b5b574d 100644 --- a/src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css +++ b/src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css @@ -686,6 +686,15 @@ min-height: 0; outline: none; } +.dv-root-wrapper { + height: 100%; + width: 100%; +} +.dv-grid-view, +.dv-branch-node { + height: 100%; + width: 100%; +} .dv-debug .dv-resize-container .dv-resize-handle-top { background-color: red; } @@ -804,15 +813,6 @@ outline: 1px solid red; outline-offset: -1; } -.dv-root-wrapper { - height: 100%; - width: 100%; -} -.dv-grid-view, -.dv-branch-node { - height: 100%; - width: 100%; -} .dv-pane-container { height: 100%; width: 100%; @@ -1023,6 +1023,67 @@ pointer-events: none; background-color: var(--dv-separator-border); } +.dv-dragged { + transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */ +} + +.dv-tab { + flex-shrink: 0; +} +.dv-tab:focus-within, .dv-tab:focus { + position: relative; +} +.dv-tab:focus-within::after, .dv-tab:focus::after { + position: absolute; + content: ""; + height: 100%; + width: 100%; + top: 0px; + left: 0px; + pointer-events: none; + outline: 1px solid var(--dv-tab-divider-color) !important; + outline-offset: -1px; + z-index: 5; +} +.dv-tab.dv-tab-dragging .dv-default-tab-action { + background-color: var(--dv-activegroup-visiblepanel-tab-color); +} +.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action { + visibility: visible; +} +.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action { + visibility: hidden; +} +.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action { + visibility: visible; +} +.dv-tab .dv-default-tab { + position: relative; + height: 100%; + display: flex; + align-items: center; + white-space: nowrap; + text-overflow: ellipsis; +} +.dv-tab .dv-default-tab .dv-default-tab-content { + flex-grow: 1; + margin-right: 4px; +} +.dv-tab .dv-default-tab .dv-default-tab-action { + padding: 4px; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; +} +.dv-tab .dv-default-tab .dv-default-tab-action:hover { + border-radius: 2px; + background-color: var(--dv-icon-hover-background-color); +} +.dv-watermark { + display: flex; + height: 100%; +} .dv-tabs-overflow-dropdown-default { height: 100%; color: var(--dv-activegroup-hiddenpanel-tab-color); @@ -1128,65 +1189,4 @@ } .dv-tabs-and-actions-container .dv-right-actions-container { display: flex; -} -.dv-dragged { - transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */ -} - -.dv-tab { - flex-shrink: 0; -} -.dv-tab:focus-within, .dv-tab:focus { - position: relative; -} -.dv-tab:focus-within::after, .dv-tab:focus::after { - position: absolute; - content: ""; - height: 100%; - width: 100%; - top: 0px; - left: 0px; - pointer-events: none; - outline: 1px solid var(--dv-tab-divider-color) !important; - outline-offset: -1px; - z-index: 5; -} -.dv-tab.dv-tab-dragging .dv-default-tab-action { - background-color: var(--dv-activegroup-visiblepanel-tab-color); -} -.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action { - visibility: visible; -} -.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action { - visibility: hidden; -} -.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action { - visibility: visible; -} -.dv-tab .dv-default-tab { - position: relative; - height: 100%; - display: flex; - align-items: center; - white-space: nowrap; - text-overflow: ellipsis; -} -.dv-tab .dv-default-tab .dv-default-tab-content { - flex-grow: 1; - margin-right: 4px; -} -.dv-tab .dv-default-tab .dv-default-tab-action { - padding: 4px; - display: flex; - align-items: center; - justify-content: center; - box-sizing: border-box; -} -.dv-tab .dv-default-tab .dv-default-tab-action:hover { - border-radius: 2px; - background-color: var(--dv-icon-hover-background-color); -} -.dv-watermark { - display: flex; - height: 100%; } \ No newline at end of file diff --git a/src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js b/src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js index 02cc3019..ed4271be 100644 --- a/src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js +++ b/src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js @@ -1,6 +1,6 @@ /** * dockview-core - * @version 4.2.4 + * @version 4.2.5 * @link https://github.com/mathuo/dockview * @license MIT */ @@ -639,9 +639,7 @@ function onDidWindowResizeEnd(element, cb) { function shiftAbsoluteElementIntoView(element, root, options = { buffer: 10 }) { const buffer = options.buffer; const rect = element.getBoundingClientRect(); - const rootRect = element.getBoundingClientRect(); - const viewportWidth = root.clientWidth; - const viewportHeight = root.clientHeight; + const rootRect = root.getBoundingClientRect(); let translateX = 0; let translateY = 0; const left = rect.left - rootRect.left; @@ -652,15 +650,15 @@ function shiftAbsoluteElementIntoView(element, root, options = { buffer: 10 }) { if (left < buffer) { translateX = buffer - left; } - else if (right > viewportWidth - buffer) { - translateX = viewportWidth - right - buffer; + else if (right > buffer) { + translateX = -buffer - right; } // Check vertical overflow if (top < buffer) { translateY = buffer - top; } - else if (bottom > viewportHeight - buffer) { - translateY = viewportHeight - bottom - buffer; + else if (bottom > buffer) { + translateY = -bottom - buffer; } // Apply the translation if needed if (translateX !== 0 || translateY !== 0) { @@ -4940,6 +4938,8 @@ function addGhostImage(dataTransfer, ghostElement, options) { var _a, _b; // class dockview provides to force ghost image to be drawn on a different layer and prevent weird rendering issues addClasses(ghostElement, 'dv-dragged'); + // move the element off-screen initially otherwise it may in some cases be rendered at (0,0) momentarily + ghostElement.style.top = '-9999px'; document.body.appendChild(ghostElement); dataTransfer.setDragImage(ghostElement, (_a = options === null || options === void 0 ? void 0 : options.x) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.y) !== null && _b !== void 0 ? _b : 0); setTimeout(() => { From 39b68fdb4cda359c2bc77f8c02f83a256846b9c4 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 7 May 2025 13:28:37 +0800 Subject: [PATCH 2/2] chore: bump version 9.1.13 --- .../BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj b/src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj index 71f1e4ca..7dfd6ca2 100644 --- a/src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj +++ b/src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj @@ -1,7 +1,7 @@  - 9.1.12 + 9.1.13