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 • 448 B
JavaScript
import { addEventListener } from '../../../../utils';
import { SnapLogic } from '..';
export class SnapKeyboard extends SnapLogic {
constructor(ctx) {
super(ctx);
this.addDestructor(addEventListener(ctx.container, 'scroll', () => this._handleScroll()));
}
/** Handle scroll lock */
_handleScroll() {
this.container.scrollTo({ top: 0, left: 0, behavior: 'instant' });
}
}
//# sourceMappingURL=index.js.map