vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
163 lines • 4.96 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SnapLogic = void 0;
var SnapLogic = /** @class */ (function () {
function SnapLogic(_snap) {
var _this = this;
this._snap = _snap;
/** Listeners to destruct */
this._destructors = [];
_snap.on('destroy', function () { return _this._destroy(); }, { protected: true });
}
Object.defineProperty(SnapLogic.prototype, "props", {
/** Snap component */
get: function () {
return this._snap.props;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "container", {
get: function () {
return this._snap.container;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "callbacks", {
/** Snap component */
get: function () {
return this._snap.callbacks;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isSwiping", {
get: function () {
return this._snap.isSwiping;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isWheeling", {
get: function () {
return this._snap.isWheeling;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "hasInertia", {
get: function () {
return this._snap.hasInertia;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isInterpolating", {
get: function () {
return this._snap.isInterpolating;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isTransitioning", {
get: function () {
return this._snap.isTransitioning;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "eventsEmitter", {
get: function () {
return this._snap.eventsEmitter;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "snapAxis", {
get: function () {
return this._snap.axis;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "track", {
get: function () {
return this._snap.$track;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isSlideScrolling", {
get: function () {
return this._snap.isSlideScrolling;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "containerSize", {
get: function () {
return this._snap.containerSize;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "activeSlide", {
get: function () {
return this._snap.activeSlide;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "activeIndex", {
get: function () {
return this._snap.activeIndex;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "slides", {
get: function () {
return this._snap.slides;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "isDestroyed", {
get: function () {
return this._snap.isDestroyed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SnapLogic.prototype, "scrollableSlides", {
get: function () {
return this._snap.scrollableSlides;
},
enumerable: false,
configurable: true
});
/** Snap component */
SnapLogic.prototype.addDestructor = function (callback) {
this._destructors.push(callback);
};
/** Destroy wheel listeners */
SnapLogic.prototype._destroy = function () {
this._destructors.forEach(function (destructor) { return destructor(); });
};
SnapLogic.prototype.next = function () {
return this._snap.next();
};
SnapLogic.prototype.prev = function () {
return this._snap.prev();
};
SnapLogic.prototype.stick = function () {
return this._snap.stick();
};
SnapLogic.prototype.getNearestMagnet = function (coord) {
return this._snap.getNearestMagnet(coord);
};
return SnapLogic;
}());
exports.SnapLogic = SnapLogic;
//# sourceMappingURL=index.js.map