mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-31 19:51:36 +08:00
fix(tab-row): Optimize tab-row scrolling experience
This commit is contained in:
parent
111258b539
commit
bbc77b522f
@ -386,15 +386,8 @@ export default class TabRowWidget extends BasicWidget {
|
||||
};
|
||||
|
||||
setupScrollEvents() {
|
||||
let isScrolling = false;
|
||||
this.$tabScrollingContainer[0].addEventListener('wheel', (event) => {
|
||||
if (!isScrolling) {
|
||||
isScrolling = true;
|
||||
requestAnimationFrame(() => {
|
||||
this.scrollTabContainer(event.deltaY * 1.5, 'instant');
|
||||
isScrolling = false;
|
||||
});
|
||||
}
|
||||
this.scrollTabContainer(event.deltaY * 1.5);
|
||||
});
|
||||
|
||||
this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-200));
|
||||
|
Loading…
x
Reference in New Issue
Block a user