sash: increase sash corner area

This commit is contained in:
Joao Moreno
2018-06-08 10:28:18 +02:00
parent e232634842
commit 4e4fcc420c
2 changed files with 14 additions and 10 deletions

View File

@@ -54,8 +54,8 @@
.monaco-sash:not(.disabled).orthogonal-start::before,
.monaco-sash:not(.disabled).orthogonal-end::after {
content: ' ';
height: 4px;
width: 4px;
height: 8px;
width: 8px;
z-index: 100;
display: block;
cursor: all-scroll;
@@ -63,19 +63,23 @@
}
.monaco-sash.orthogonal-start.vertical::before {
top: -2px;
left: -2px;
top: -4px;
}
.monaco-sash.orthogonal-end.vertical::after {
bottom: -2px;
left: -2px;
bottom: -4px;
}
.monaco-sash.orthogonal-start.horizontal::before {
left: -2px;
top: -2px;
left: -4px;
}
.monaco-sash.orthogonal-end.horizontal::after {
right: -2px;
top: -2px;
right: -4px;
}
.monaco-sash.disabled {

View File

@@ -179,15 +179,15 @@ export class Sash {
let orthogonalSash: Sash | undefined;
if (this.orientation === Orientation.VERTICAL) {
if (e.offsetY <= 2) {
if (e.offsetY <= 4) {
orthogonalSash = this.orthogonalStartSash;
} else if (e.offsetY >= this.el.clientHeight - 2) {
} else if (e.offsetY >= this.el.clientHeight - 4) {
orthogonalSash = this.orthogonalEndSash;
}
} else {
if (e.offsetX <= 2) {
if (e.offsetX <= 4) {
orthogonalSash = this.orthogonalStartSash;
} else if (e.offsetX >= this.el.clientWidth - 2) {
} else if (e.offsetX >= this.el.clientWidth - 4) {
orthogonalSash = this.orthogonalEndSash;
}
}