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.

31 lines 1.02 kB
"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, "snap", { /** Snap component */ get: function () { return this._snap; }, 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(); }); }; return SnapLogic; }()); exports.SnapLogic = SnapLogic; //# sourceMappingURL=index.js.map