mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
fix(tab-row): Optimize tab-row scrolling experience
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user