Buckets:
| import { MacOSScrollAccel, type ScrollAcceleration } from "@opentui/core" | |
| export type ScrollConfig = { | |
| scroll_acceleration?: { enabled?: boolean } | |
| scroll_speed?: number | |
| } | |
| export class CustomSpeedScroll implements ScrollAcceleration { | |
| constructor(private speed: number) {} | |
| tick(_now?: number): number { | |
| return this.speed | |
| } | |
| reset(): void {} | |
| } | |
| export function getScrollAcceleration(tuiConfig?: ScrollConfig): ScrollAcceleration { | |
| if (tuiConfig?.scroll_acceleration?.enabled) { | |
| return new MacOSScrollAccel() | |
| } | |
| if (tuiConfig?.scroll_speed !== undefined) { | |
| return new CustomSpeedScroll(tuiConfig.scroll_speed) | |
| } | |
| return new CustomSpeedScroll(3) | |
| } | |
Xet Storage Details
- Size:
- 680 Bytes
- Xet hash:
- d1d3fc2a2bae784b6bcf414050cd48ccfb372660bbdcda785a8500569d34e649
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.