A TypeScript plugin for BetterScroll that provides enhanced mouse wheel scrolling capabilities with configurable speed, direction, easing, and boundary damping on PC platforms.
Overall
score
98%
Build a desktop-friendly scrollable content viewer that provides smooth mouse wheel scrolling with customizable sensitivity and visual feedback. The viewer should display a list of content items and allow users to scroll through them using their mouse wheel with enhanced control options.
Scrollable Content Container
Mouse Wheel Scrolling
Scroll Speed Controls
Scroll Direction Toggle
Scroll Event Monitoring
Create an HTML file with:
overflow: hidden and fixed dimensionsProvides the core scrolling functionality.
Provides desktop mouse wheel scrolling support with configurable options.
File: index.test.ts
Description: Verify that mouse wheel scrolling is enabled and functional
Test Steps:
Expected Result: The container should scroll in response to mouse wheel events
File: index.test.ts
Description: Verify that scroll speed can be adjusted dynamically
Test Steps:
Expected Result: Higher speed settings should result in greater scroll distance per wheel event
File: index.test.ts
Description: Verify that scroll direction can be inverted
Test Steps:
Expected Result: With inversion enabled, scroll direction should be reversed
File: index.test.ts
Description: Verify that mouse wheel scroll events are fired correctly
Test Steps:
Expected Result: Start, move, and end events should fire in the correct order during wheel scrolling
index.html - Main HTML structurestyles.css - Styling for the content viewerindex.ts - TypeScript implementation with mouse wheel configurationindex.test.ts - Test suite covering the required test casesInstall with Tessl CLI
npx tessl i tessl/npm-better-scroll--mouse-wheeldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10