Bugfixes
This commit is contained in:
parent
73c4190231
commit
91175653c6
|
@ -89,22 +89,26 @@ class Calendar(calendar: HTMLElement) : View(calendar) {
|
|||
val x = html.offsetTop - htmlBody.scrollTop
|
||||
if (x > 0) {
|
||||
val bodyScroll = min(x, verticalScroll)
|
||||
verticalScroll -= bodyScroll
|
||||
verticalScroll = 0.0
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, bodyScroll, ScrollBehavior.INSTANT))
|
||||
} else {
|
||||
if (calendarTable.scrollTop + calendarTable.clientHeight + 5 >= calendarTable.scrollHeight) {
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, verticalScroll, ScrollBehavior.INSTANT))
|
||||
} else if (x < 0) {
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, x, ScrollBehavior.INSTANT))
|
||||
}
|
||||
}
|
||||
} else if (verticalScroll < 0) {
|
||||
val x = html.offsetTop - htmlBody.scrollTop
|
||||
if (x < 0) {
|
||||
val bodyScroll = max(x, verticalScroll)
|
||||
verticalScroll -= bodyScroll
|
||||
verticalScroll = 0.0
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, bodyScroll, ScrollBehavior.INSTANT))
|
||||
} else {
|
||||
if (calendarTable.scrollTop == 0.0) {
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, verticalScroll, ScrollBehavior.INSTANT))
|
||||
} else if (x > 0) {
|
||||
htmlBody.scrollBy(ScrollToOptions(0.0, x, ScrollBehavior.INSTANT))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -369,7 +369,12 @@
|
|||
|
||||
.calendar-cell:first-child {
|
||||
text-align: center;
|
||||
width: 6rem;
|
||||
width: 4rem;
|
||||
left: 0;
|
||||
position: sticky;
|
||||
z-index: 2;
|
||||
background-color: var(--background-secondary-color);
|
||||
border-right: solid 1px var(--table-border-color);
|
||||
}
|
||||
|
||||
.calendar-cell:not(:first-child) {
|
||||
|
@ -387,6 +392,10 @@
|
|||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-cell:nth-child(1)::before , .calendar-cell:nth-child(2)::before{
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-body {
|
||||
|
@ -421,12 +430,20 @@
|
|||
}
|
||||
|
||||
.calendar-cell:first-child {
|
||||
width: 6rem;
|
||||
width: 4rem;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
position: sticky;
|
||||
z-index: 2;
|
||||
background-color: var(--background-secondary-color);
|
||||
border-right: solid 1px var(--table-border-color);
|
||||
|
||||
&:not(:empty) {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-cell:first-child::before {
|
||||
.calendar-cell:nth-child(1)::before , .calendar-cell:nth-child(2)::before{
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue