Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'feat(calendar): add mouse wheel navigation in month and agenda views' (#312) from feat/calendar-wheel-nav into main

scott a6011b17 8b2e3e84

+23
+23
src/calendar/main.ts
··· 896 896 }); 897 897 898 898 // --------------------------------------------------------------------------- 899 + // Mouse wheel navigation (month view: scroll months, agenda: scroll weeks) 900 + // --------------------------------------------------------------------------- 901 + 902 + let wheelCooldown = false; 903 + 904 + calendarGrid.addEventListener('wheel', (e) => { 905 + // Only navigate in month and agenda views — week/day have native scroll 906 + if (state.view !== 'month' && state.view !== 'agenda') return; 907 + 908 + // Debounce to prevent rapid-fire navigation 909 + if (wheelCooldown) return; 910 + wheelCooldown = true; 911 + setTimeout(() => { wheelCooldown = false; }, 300); 912 + 913 + e.preventDefault(); 914 + if (e.deltaY > 0) { 915 + navigateNext(); 916 + } else if (e.deltaY < 0) { 917 + navigatePrev(); 918 + } 919 + }, { passive: false }); 920 + 921 + // --------------------------------------------------------------------------- 899 922 // iCal import 900 923 // --------------------------------------------------------------------------- 901 924