mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	fix(tab-row): Simplify scrolling logic
This commit is contained in:
		
							parent
							
								
									ebb1654d0e
								
							
						
					
					
						commit
						de4f0f7d6f
					
				| @ -285,6 +285,7 @@ const TAB_ROW_TPL = ` | |||||||
|         overflow-y: hidden; |         overflow-y: hidden; | ||||||
|         scrollbar-width: none; /* Firefox */ |         scrollbar-width: none; /* Firefox */ | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|     /* Chrome/Safari */ |     /* Chrome/Safari */ | ||||||
|     .tab-row-widget-scrolling-container::-webkit-scrollbar { |     .tab-row-widget-scrolling-container::-webkit-scrollbar { | ||||||
|         display: none; |         display: none; | ||||||
| @ -391,11 +392,7 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             event.preventDefault(); |             event.preventDefault(); | ||||||
| 
 |             event.currentTarget.scrollLeft += wheelEvent.deltaY + wheelEvent.deltaX; | ||||||
|             const delta = Math.sign(wheelEvent.deltaX + wheelEvent.deltaY) * |  | ||||||
|                 Math.min(Math.abs(wheelEvent.deltaX + wheelEvent.deltaY), TAB_CONTAINER_MIN_WIDTH * 2); |  | ||||||
| 
 |  | ||||||
|             this.scrollTabContainer(delta, "instant"); |  | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-200)); |         this.$scrollButtonLeft[0].addEventListener('click', () => this.scrollTabContainer(-200)); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 SiriusXT
						SiriusXT