UNPKG

vevet

Version:

Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.

85 lines 2.02 kB
export class SnapLogic { constructor(_snap) { this._snap = _snap; /** Listeners to destruct */ this._destructors = []; _snap.on('destroy', () => this._destroy(), { protected: true }); } /** Snap component */ get props() { return this._snap.props; } get container() { return this._snap.container; } /** Snap component */ get callbacks() { return this._snap.callbacks; } get isSwiping() { return this._snap.isSwiping; } get isWheeling() { return this._snap.isWheeling; } get hasInertia() { return this._snap.hasInertia; } get isInterpolating() { return this._snap.isInterpolating; } get isTransitioning() { return this._snap.isTransitioning; } get eventsEmitter() { return this._snap.eventsEmitter; } get snapAxis() { return this._snap.axis; } get track() { return this._snap.$track; } get isSlideScrolling() { return this._snap.isSlideScrolling; } get containerSize() { return this._snap.containerSize; } get activeSlide() { return this._snap.activeSlide; } get activeIndex() { return this._snap.activeIndex; } get slides() { return this._snap.slides; } get isDestroyed() { return this._snap.isDestroyed; } get scrollableSlides() { return this._snap.scrollableSlides; } /** Snap component */ addDestructor(callback) { this._destructors.push(callback); } /** Destroy wheel listeners */ _destroy() { this._destructors.forEach((destructor) => destructor()); } next() { return this._snap.next(); } prev() { return this._snap.prev(); } stick() { return this._snap.stick(); } getNearestMagnet(coord) { return this._snap.getNearestMagnet(coord); } } //# sourceMappingURL=index.js.map