mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(tab-row): Make the default distance include margin
This commit is contained in:
parent
949ff17776
commit
f48d17cb22
@ -396,8 +396,8 @@ export default class TabRowWidget extends BasicWidget {
|
||||
event.currentTarget.scrollLeft += wheelEvent.deltaY + wheelEvent.deltaX;
|
||||
});
|
||||
|
||||
this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-200));
|
||||
this.$scrollButtonRight[0].addEventListener('click', () => this.scrollTabContainer(200));
|
||||
this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-210));
|
||||
this.$scrollButtonRight[0].addEventListener('click', () => this.scrollTabContainer(210));
|
||||
|
||||
this.$tabScrollingContainer[0].addEventListener('scroll', () => {
|
||||
clearTimeout(this.updateScrollTimeout);
|
||||
@ -729,7 +729,7 @@ export default class TabRowWidget extends BasicWidget {
|
||||
|
||||
const scorllContainerBounds = this.$tabScrollingContainer[0]?.getBoundingClientRect();
|
||||
const pointerX = pointer.pageX;
|
||||
const scrollSpeed = 100; // The increment of each scroll.
|
||||
const scrollSpeed = 105; // The increment of each scroll.
|
||||
// Check if the mouse is near the edge of the container and trigger scrolling.
|
||||
if (pointerX < scorllContainerBounds.left) {
|
||||
this.scrollTabContainer(- scrollSpeed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user