vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
13 lines • 466 B
JavaScript
import { addEventListener } from '../../../../utils';
import { SnapLogic } from '../SnapLogic';
export class SnapKeyboard extends SnapLogic {
constructor(snap) {
super(snap);
this.addDestructor(addEventListener(snap.container, 'scroll', () => this._handleScroll()));
}
/** Handle scroll lock */
_handleScroll() {
this.snap.container.scrollTo({ top: 0, left: 0, behavior: 'instant' });
}
}
//# sourceMappingURL=index.js.map