提交 3117f30f 编写于 作者: J Joao Moreno

remove bottom corners of filter type widget

fixes #66897
上级 9ad7e6a4
......@@ -80,6 +80,7 @@
line-height: 18px;
height: 20px;
z-index: 1;
top: 4px;
}
.monaco-list-type-filter.dragging {
......@@ -87,22 +88,10 @@
}
.monaco-list-type-filter.ne {
top: 4px;
right: 4px;
}
.monaco-list-type-filter.nw {
top: 4px;
left: 4px;
}
.monaco-list-type-filter.se {
bottom: 4px;
right: 4px;
}
.monaco-list-type-filter.sw {
bottom: 4px;
left: 4px;
}
......
......@@ -467,13 +467,10 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
private onDragStart(): void {
const container = this.view.getHTMLElement();
const { top, left } = getDomNodePagePosition(container);
const { left } = getDomNodePagePosition(container);
const containerWidth = container.clientWidth;
const containerHeight = container.clientHeight;
const midContainerWidth = containerWidth / 2;
const midContainerHeight = containerHeight / 2;
const width = this.domNode.clientWidth;
const height = this.domNode.clientHeight;
const disposables: IDisposable[] = [];
let positionClassName = this.positionClassName;
......@@ -487,29 +484,16 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
this.domNode.style.top = `4px`;
this.domNode.style.left = `${containerWidth - width - 6}px`;
break;
case 'sw':
this.domNode.style.top = `${containerHeight - height - 6}px`;
this.domNode.style.left = `4px`;
break;
case 'se':
this.domNode.style.top = `${containerHeight - height - 6}px`;
this.domNode.style.left = `${containerWidth - width - 6}px`;
break;
}
};
const onDragOver = (event: DragEvent) => {
const x = event.screenX - left;
const y = event.screenY - top;
if (x < midContainerWidth && y < midContainerHeight) {
if (x < midContainerWidth) {
positionClassName = 'nw';
} else if (x >= midContainerWidth && y < midContainerHeight) {
positionClassName = 'ne';
} else if (x < midContainerWidth && y >= midContainerHeight) {
positionClassName = 'sw';
} else {
positionClassName = 'se';
positionClassName = 'ne';
}
updatePosition();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册