vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
21 lines • 564 B
JavaScript
export class SnapLogic {
constructor(_snap) {
this._snap = _snap;
/** Listeners to destruct */
this._destructors = [];
_snap.on('destroy', () => this._destroy(), { protected: true });
}
/** Snap component */
get snap() {
return this._snap;
}
/** Snap component */
addDestructor(callback) {
this._destructors.push(callback);
}
/** Destroy wheel listeners */
_destroy() {
this._destructors.forEach((destructor) => destructor());
}
}
//# sourceMappingURL=index.js.map