Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 70 additions & 70 deletions src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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%;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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%;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* dockview-core
* @version 4.2.4
* @version 4.2.5
* @link https://github.com/mathuo/dockview
* @license MIT
*/
Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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(() => {
Expand Down