Skip to content

Commit e76b1ff

Browse files
committed
💄
1 parent 2cfe4ca commit e76b1ff

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,27 +1171,14 @@ export class MultiEditorTabsControl extends EditorTabsControl {
11711171
} else {
11721172
dropTarget = undefined;
11731173
}
1174-
this.updateDropTarget(dropTarget);
11751174

1176-
// Outline
1177-
const activeContrastBorderColor = this.getColor(activeContrastBorder);
1178-
if (activeContrastBorderColor && isDND) {
1179-
element.style.outlineWidth = '2px';
1180-
element.style.outlineStyle = 'dashed';
1181-
element.style.outlineColor = activeContrastBorderColor;
1182-
element.style.outlineOffset = isTab ? '-5px' : '-3px';
1183-
} else {
1184-
element.style.outlineWidth = '';
1185-
element.style.outlineStyle = '';
1186-
element.style.outlineColor = activeContrastBorderColor || '';
1187-
element.style.outlineOffset = '';
1188-
}
1175+
this.updateDropTarget(dropTarget);
11891176
}
11901177

11911178
private dropTarget: { leftElement: HTMLElement | undefined; rightElement: HTMLElement | undefined } | undefined;
1192-
private updateDropTarget(target: { leftElement: HTMLElement | undefined; rightElement: HTMLElement | undefined } | undefined): void {
1179+
private updateDropTarget(newTarget: { leftElement: HTMLElement | undefined; rightElement: HTMLElement | undefined } | undefined): void {
11931180
const oldTargets = this.dropTarget;
1194-
if (oldTargets === target || oldTargets && target && oldTargets.leftElement === target.leftElement && oldTargets.rightElement === target.rightElement) {
1181+
if (oldTargets === newTarget || oldTargets && newTarget && oldTargets.leftElement === newTarget.leftElement && oldTargets.rightElement === newTarget.rightElement) {
11951182
return;
11961183
}
11971184

@@ -1203,12 +1190,12 @@ export class MultiEditorTabsControl extends EditorTabsControl {
12031190
oldTargets.rightElement?.classList.remove(dropClassRight);
12041191
}
12051192

1206-
if (target) {
1207-
target.leftElement?.classList.add(dropClassLeft);
1208-
target.rightElement?.classList.add(dropClassRight);
1193+
if (newTarget) {
1194+
newTarget.leftElement?.classList.add(dropClassLeft);
1195+
newTarget.rightElement?.classList.add(dropClassRight);
12091196
}
12101197

1211-
this.dropTarget = target;
1198+
this.dropTarget = newTarget;
12121199
}
12131200

12141201
private getTabDragOverLocation(e: DragEvent, tab: HTMLElement): 'left' | 'right' {

0 commit comments

Comments
 (0)