Fix all loneliness

This commit is contained in:
Bill Thornton
2023-09-12 17:02:06 -04:00
parent aef99ce247
commit 20381bd3ec
22 changed files with 154 additions and 223 deletions
+6 -10
View File
@@ -54,12 +54,10 @@ export function toCenter(container, elem, horizontal, skipWhenVisible) {
} else {
container.scrollTo(0, pos.center);
}
} else if (horizontal) {
container.scrollLeft = Math.round(pos.center);
} else {
if (horizontal) {
container.scrollLeft = Math.round(pos.center);
} else {
container.scrollTop = Math.round(pos.center);
}
container.scrollTop = Math.round(pos.center);
}
}
@@ -76,12 +74,10 @@ export function toStart(container, elem, horizontal, skipWhenVisible) {
} else {
container.scrollTo(0, pos.start);
}
} else if (horizontal) {
container.scrollLeft = Math.round(pos.start);
} else {
if (horizontal) {
container.scrollLeft = Math.round(pos.start);
} else {
container.scrollTop = Math.round(pos.start);
}
container.scrollTop = Math.round(pos.start);
}
}