vevet 1.4.27 → 2.0.1-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +7 -71
- package/build/cdn/index.js +12 -0
- package/build/cdn/index.js.LICENSE.txt +14 -0
- package/build/cjs/app/Application.js +297 -0
- package/build/cjs/app/events/PageLoad.js +74 -0
- package/build/cjs/app/events/Viewport.js +303 -0
- package/build/cjs/base/Callbacks.js +232 -0
- package/build/cjs/base/Component.js +56 -0
- package/build/cjs/base/Module.js +262 -0
- package/build/cjs/base/MutableProp.js +165 -0
- package/build/cjs/base/Plugin.js +56 -0
- package/build/cjs/components/animation-frame/AnimationFrame.js +183 -0
- package/build/cjs/components/canvas/Ctx2D.js +200 -0
- package/build/cjs/components/canvas/Ctx2DPrerender.js +72 -0
- package/build/cjs/components/cursor/CustomCursor.js +344 -0
- package/build/cjs/components/dragger/Dragger.js +229 -0
- package/build/cjs/components/dragger/DraggerDirection.js +77 -0
- package/build/cjs/components/dragger/DraggerMove.js +84 -0
- package/build/cjs/components/loading/Preloader.js +229 -0
- package/build/cjs/components/loading/ProgressPreloader.js +377 -0
- package/build/cjs/components/page/Page.js +353 -0
- package/build/cjs/components/scroll/custom-scroll/CustomScroll.js +517 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollDragPlugin.js +178 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +138 -0
- package/build/cjs/components/scroll/scrollable/ScrollEventsBase.js +133 -0
- package/build/cjs/components/scroll/scrollable/ScrollView.js +315 -0
- package/build/cjs/components/scroll/scrollbar/Bar.js +315 -0
- package/build/cjs/components/scroll/scrollbar/ScrollBar.js +206 -0
- package/build/cjs/components/scroll/smooth-scroll/SmoothScroll.js +625 -0
- package/build/cjs/components/scroll/types.js +2 -0
- package/build/cjs/components/split-text/SplitText.js +233 -0
- package/build/cjs/components/text/SplitText.js +329 -0
- package/build/cjs/components/timeline/StaticTimeline.js +137 -0
- package/build/cjs/components/timeline/Timeline.js +190 -0
- package/build/cjs/index.js +87 -0
- package/build/cjs/utils/common/index.js +12 -0
- package/build/cjs/utils/common/mergeWithoutArrays.js +19 -0
- package/build/cjs/utils/common/randID.js +11 -0
- package/build/cjs/utils/common/timeoutCallback.js +17 -0
- package/build/cjs/utils/errors.js +8 -0
- package/build/cjs/utils/listeners/index.js +10 -0
- package/build/cjs/utils/listeners/intersectionObserverSupported.js +11 -0
- package/build/cjs/utils/listeners/onScroll.js +47 -0
- package/build/cjs/utils/math/boundVal.js +16 -0
- package/build/cjs/utils/math/index.js +12 -0
- package/build/cjs/utils/math/lerp.js +15 -0
- package/build/cjs/utils/math/scopeProgress.js +25 -0
- package/build/cjs/utils/types/general.js +2 -0
- package/build/cjs/utils/types/utility.js +2 -0
- package/build/es/app/Application.js +210 -0
- package/build/es/app/events/PageLoad.js +47 -0
- package/build/es/app/events/Viewport.js +232 -0
- package/build/es/base/Callbacks.js +205 -0
- package/build/es/base/Component.js +32 -0
- package/build/es/base/Module.js +225 -0
- package/build/es/base/MutableProp.js +152 -0
- package/build/es/base/Plugin.js +31 -0
- package/build/es/components/animation-frame/AnimationFrame.js +145 -0
- package/build/es/components/canvas/Ctx2D.js +133 -0
- package/build/es/components/canvas/Ctx2DPrerender.js +37 -0
- package/build/es/components/cursor/CustomCursor.js +274 -0
- package/build/es/components/dragger/Dragger.js +175 -0
- package/build/es/components/dragger/DraggerDirection.js +42 -0
- package/build/es/components/dragger/DraggerMove.js +56 -0
- package/build/es/components/loading/Preloader.js +164 -0
- package/build/es/components/loading/ProgressPreloader.js +304 -0
- package/build/es/components/page/Page.js +283 -0
- package/build/es/components/scroll/custom-scroll/CustomScroll.js +486 -0
- package/build/es/components/scroll/plugins/SmoothScrollDragPlugin.js +140 -0
- package/build/es/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +109 -0
- package/build/es/components/scroll/scrollable/ScrollEventsBase.js +79 -0
- package/build/es/components/scroll/scrollable/ScrollView.js +264 -0
- package/build/es/components/scroll/scrollbar/Bar.js +262 -0
- package/build/es/components/scroll/scrollbar/ScrollBar.js +152 -0
- package/build/es/components/scroll/smooth-scroll/SmoothScroll.js +519 -0
- package/build/es/components/scroll/types.js +1 -0
- package/build/es/components/split-text/SplitText.js +199 -0
- package/build/es/components/text/SplitText.js +270 -0
- package/build/es/components/timeline/StaticTimeline.js +92 -0
- package/build/es/components/timeline/Timeline.js +141 -0
- package/build/es/index.js +37 -0
- package/build/es/utils/common/index.js +4 -0
- package/build/es/utils/common/mergeWithoutArrays.js +13 -0
- package/build/es/utils/common/randID.js +7 -0
- package/build/es/utils/common/timeoutCallback.js +14 -0
- package/build/es/utils/errors.js +5 -0
- package/build/es/utils/listeners/index.js +3 -0
- package/build/es/utils/listeners/intersectionObserverSupported.js +8 -0
- package/build/es/utils/listeners/onScroll.js +44 -0
- package/build/es/utils/math/boundVal.js +12 -0
- package/build/es/utils/math/index.js +4 -0
- package/build/es/utils/math/lerp.js +11 -0
- package/build/es/utils/math/scopeProgress.js +22 -0
- package/build/es/utils/types/general.js +1 -0
- package/build/es/utils/types/utility.js +1 -0
- package/build/types/app/Application.d.ts +161 -0
- package/build/types/app/Application.d.ts.map +1 -0
- package/build/types/app/events/PageLoad.d.ts +28 -0
- package/build/types/app/events/PageLoad.d.ts.map +1 -0
- package/build/types/app/events/Viewport.d.ts +137 -0
- package/build/types/app/events/Viewport.d.ts.map +1 -0
- package/build/types/base/Callbacks.d.ts +174 -0
- package/build/types/base/Callbacks.d.ts.map +1 -0
- package/build/types/base/Component.d.ts +48 -0
- package/build/types/base/Component.d.ts.map +1 -0
- package/build/types/base/Module.d.ts +179 -0
- package/build/types/base/Module.d.ts.map +1 -0
- package/build/types/base/MutableProp.d.ts +142 -0
- package/build/types/base/MutableProp.d.ts.map +1 -0
- package/build/types/base/Plugin.d.ts +35 -0
- package/build/types/base/Plugin.d.ts.map +1 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts +96 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2D.d.ts +111 -0
- package/build/types/components/canvas/Ctx2D.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts +41 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts.map +1 -0
- package/build/types/components/cursor/CustomCursor.d.ts +181 -0
- package/build/types/components/cursor/CustomCursor.d.ts.map +1 -0
- package/build/types/components/dragger/Dragger.d.ts +120 -0
- package/build/types/components/dragger/Dragger.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerDirection.d.ts +39 -0
- package/build/types/components/dragger/DraggerDirection.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerMove.d.ts +49 -0
- package/build/types/components/dragger/DraggerMove.d.ts.map +1 -0
- package/build/types/components/loading/Preloader.d.ts +107 -0
- package/build/types/components/loading/Preloader.d.ts.map +1 -0
- package/build/types/components/loading/ProgressPreloader.d.ts +166 -0
- package/build/types/components/loading/ProgressPreloader.d.ts.map +1 -0
- package/build/types/components/page/Page.d.ts +126 -0
- package/build/types/components/page/Page.d.ts.map +1 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts +322 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts +97 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts +34 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts +60 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts +140 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts +84 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts +109 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts.map +1 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts +307 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts.map +1 -0
- package/build/types/components/scroll/types.d.ts +11 -0
- package/build/types/components/scroll/types.d.ts.map +1 -0
- package/build/types/components/split-text/SplitText.d.ts +118 -0
- package/build/types/components/split-text/SplitText.d.ts.map +1 -0
- package/build/types/components/text/SplitText.d.ts +118 -0
- package/build/types/components/text/SplitText.d.ts.map +1 -0
- package/build/types/components/timeline/StaticTimeline.d.ts +92 -0
- package/build/types/components/timeline/StaticTimeline.d.ts.map +1 -0
- package/build/types/components/timeline/Timeline.d.ts +101 -0
- package/build/types/components/timeline/Timeline.d.ts.map +1 -0
- package/build/types/index.d.ts +38 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/utils/common/index.d.ts +5 -0
- package/build/types/utils/common/index.d.ts.map +1 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts +6 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts.map +1 -0
- package/build/types/utils/common/randID.d.ts +5 -0
- package/build/types/utils/common/randID.d.ts.map +1 -0
- package/build/types/utils/common/timeoutCallback.d.ts +6 -0
- package/build/types/utils/common/timeoutCallback.d.ts.map +1 -0
- package/build/types/utils/errors.d.ts +3 -0
- package/build/types/utils/errors.d.ts.map +1 -0
- package/build/types/utils/listeners/index.d.ts +4 -0
- package/build/types/utils/listeners/index.d.ts.map +1 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts +2 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts.map +1 -0
- package/build/types/utils/listeners/onScroll.d.ts +10 -0
- package/build/types/utils/listeners/onScroll.d.ts.map +1 -0
- package/build/types/utils/math/boundVal.d.ts +5 -0
- package/build/types/utils/math/boundVal.d.ts.map +1 -0
- package/build/types/utils/math/index.d.ts +5 -0
- package/build/types/utils/math/index.d.ts.map +1 -0
- package/build/types/utils/math/lerp.d.ts +5 -0
- package/build/types/utils/math/lerp.d.ts.map +1 -0
- package/build/types/utils/math/scopeProgress.d.ts +20 -0
- package/build/types/utils/math/scopeProgress.d.ts.map +1 -0
- package/build/types/utils/types/general.d.ts +7 -0
- package/build/types/utils/types/general.d.ts.map +1 -0
- package/build/types/utils/types/utility.d.ts +14 -0
- package/build/types/utils/types/utility.d.ts.map +1 -0
- package/package.json +88 -82
- package/src/cdn/index.js +3 -0
- package/src/sass/base.scss +3 -0
- package/src/sass/components/cursor/_custom-cursor.scss +63 -0
- package/src/sass/components/index.scss +6 -0
- package/src/sass/components/loading/_preloader.scss +15 -0
- package/src/sass/components/scroll/_scrollbar.scss +73 -0
- package/src/sass/components/scroll/_smooth-scroll.scss +17 -0
- package/src/sass/index.scss +3 -0
- package/src/sass/mixins/_scroll.scss +7 -0
- package/{dist/scss → src/sass}/mixins/_transition.scss +8 -4
- package/src/sass/mixins/_viewport.scss +69 -0
- package/src/sass/mixins/index.scss +3 -0
- package/src/ts/app/Application.ts +350 -0
- package/src/ts/app/events/PageLoad.ts +79 -0
- package/src/ts/app/events/Viewport.ts +365 -0
- package/src/ts/base/Callbacks.ts +380 -0
- package/src/ts/base/Component.ts +83 -0
- package/src/ts/base/Module.ts +385 -0
- package/src/ts/base/MutableProp.ts +242 -0
- package/src/ts/base/Plugin.ts +76 -0
- package/src/ts/components/animation-frame/AnimationFrame.ts +264 -0
- package/src/ts/components/canvas/Ctx2D.ts +260 -0
- package/src/ts/components/canvas/Ctx2DPrerender.ts +96 -0
- package/src/ts/components/cursor/CustomCursor.ts +462 -0
- package/src/ts/components/dragger/Dragger.ts +313 -0
- package/src/ts/components/dragger/DraggerDirection.ts +106 -0
- package/src/ts/components/dragger/DraggerMove.ts +114 -0
- package/src/ts/components/loading/Preloader.ts +279 -0
- package/src/ts/components/loading/ProgressPreloader.ts +484 -0
- package/src/ts/components/page/Page.ts +421 -0
- package/src/ts/components/scroll/plugins/SmoothScrollDragPlugin.ts +251 -0
- package/src/ts/components/scroll/plugins/SmoothScrollKeyboardPlugin.ts +166 -0
- package/src/ts/components/scroll/scrollable/ScrollEventsBase.ts +151 -0
- package/src/ts/components/scroll/scrollable/ScrollView.ts +435 -0
- package/src/ts/components/scroll/scrollbar/Bar.ts +364 -0
- package/src/ts/components/scroll/scrollbar/ScrollBar.ts +292 -0
- package/src/ts/components/scroll/smooth-scroll/SmoothScroll.ts +861 -0
- package/src/ts/components/scroll/types.ts +10 -0
- package/src/ts/components/text/SplitText.ts +418 -0
- package/src/ts/components/timeline/StaticTimeline.ts +197 -0
- package/src/ts/components/timeline/Timeline.ts +256 -0
- package/src/ts/index.ts +94 -0
- package/src/ts/utils/common/index.ts +9 -0
- package/src/ts/utils/common/mergeWithoutArrays.ts +20 -0
- package/src/ts/utils/common/randID.ts +9 -0
- package/src/ts/utils/common/timeoutCallback.ts +16 -0
- package/src/ts/utils/errors.ts +6 -0
- package/src/ts/utils/listeners/index.ts +7 -0
- package/src/ts/utils/listeners/intersectionObserverSupported.ts +10 -0
- package/src/ts/utils/listeners/onScroll.ts +56 -0
- package/src/ts/utils/math/boundVal.ts +15 -0
- package/src/ts/utils/math/index.ts +9 -0
- package/src/ts/utils/math/lerp.ts +16 -0
- package/src/ts/utils/math/scopeProgress.ts +23 -0
- package/src/ts/utils/types/general.ts +7 -0
- package/src/ts/utils/types/utility.ts +34 -0
- package/dist/js/AJAXEvent.js +0 -355
- package/dist/js/Application.js +0 -345
- package/dist/js/ColumnsModule.js +0 -392
- package/dist/js/CursorModule.js +0 -390
- package/dist/js/DraggerModule.js +0 -792
- package/dist/js/Event.js +0 -538
- package/dist/js/FilterModule.js +0 -943
- package/dist/js/FormModule.js +0 -706
- package/dist/js/FrameModule.js +0 -229
- package/dist/js/IntervalModule.js +0 -270
- package/dist/js/KeydownModule.js +0 -293
- package/dist/js/LoadEvent.js +0 -106
- package/dist/js/MenuBaseModule.js +0 -292
- package/dist/js/MenuModule.js +0 -265
- package/dist/js/MenuTimelineModule.js +0 -321
- package/dist/js/Module.js +0 -478
- package/dist/js/PageAjaxModule.js +0 -1010
- package/dist/js/PageLoadMediaPlugin.js +0 -285
- package/dist/js/PageModule.js +0 -440
- package/dist/js/PaginationModule.js +0 -961
- package/dist/js/PaginationScrollPlugin.js +0 -209
- package/dist/js/Plugin.js +0 -114
- package/dist/js/PopupModule.js +0 -942
- package/dist/js/PreloaderModule.js +0 -724
- package/dist/js/ResponsiveProp.js +0 -301
- package/dist/js/ScrollAnchorModule.js +0 -554
- package/dist/js/ScrollAnimateModule.js +0 -419
- package/dist/js/ScrollBarPlugin.js +0 -594
- package/dist/js/ScrollDragPlugin.js +0 -396
- package/dist/js/ScrollModule.js +0 -1071
- package/dist/js/ScrollViewModule.js +0 -388
- package/dist/js/SelectModule.js +0 -860
- package/dist/js/SliderCanvasModule.js +0 -733
- package/dist/js/SliderControlsPlugin.js +0 -247
- package/dist/js/SliderCounterPlugin.js +0 -278
- package/dist/js/SliderDotsPlugin.js +0 -270
- package/dist/js/SliderDragSwipePlugin.js +0 -245
- package/dist/js/SliderIntervalPlugin.js +0 -192
- package/dist/js/SliderKeydownPlugin.js +0 -185
- package/dist/js/SliderModule.js +0 -1062
- package/dist/js/SliderWheelPlugin.js +0 -194
- package/dist/js/TextAnimateModule.js +0 -663
- package/dist/js/TextSplitModule.js +0 -785
- package/dist/js/TimelineBaseModule.js +0 -405
- package/dist/js/TimelineModule.js +0 -494
- package/dist/js/URLEvent.js +0 -239
- package/dist/js/ViewportEvent.js +0 -465
- package/dist/js/WheelEventModule.js +0 -295
- package/dist/js/domChildOf.js +0 -46
- package/dist/js/domChildren.js +0 -47
- package/dist/js/domInsertAfter.js +0 -32
- package/dist/js/domRemoveChildren.js +0 -26
- package/dist/js/easing.js +0 -363
- package/dist/js/eventListenerAdd.js +0 -87
- package/dist/js/eventListenerGet.js +0 -49
- package/dist/js/eventListenerRemove.js +0 -36
- package/dist/js/generateId.js +0 -29
- package/dist/js/getBrowserName.js +0 -60
- package/dist/js/getOsName.js +0 -39
- package/dist/js/getVevetProperties.js +0 -22
- package/dist/js/index.js +0 -519
- package/dist/js/mathScopeProgress.js +0 -32
- package/dist/js/mathSpreadScopeProgress.js +0 -35
- package/dist/js/merge.js +0 -33
- package/dist/js/normalizeWheel.js +0 -97
- package/dist/js/text_animate_module_addons/_composite_elementary.js +0 -196
- package/dist/js/text_animate_module_addons/_elementary.js +0 -88
- package/dist/js/timeoutCallback.js +0 -26
- package/dist/js/vevet.js +0 -10
- package/dist/scss/_prefix.scss +0 -1
- package/dist/scss/classes/_clear.scss +0 -5
- package/dist/scss/classes/_col-row.scss +0 -48
- package/dist/scss/classes/_display.scss +0 -65
- package/dist/scss/classes/_document-reset.scss +0 -28
- package/dist/scss/classes/_document.scss +0 -7
- package/dist/scss/classes/_overflow.scss +0 -39
- package/dist/scss/classes/_position.scss +0 -55
- package/dist/scss/classes/_text.scss +0 -24
- package/dist/scss/classes/_transition.scss +0 -22
- package/dist/scss/classes/_wrap.scss +0 -31
- package/dist/scss/classes/index.scss +0 -14
- package/dist/scss/index.scss +0 -3
- package/dist/scss/mixins/_clear.scss +0 -6
- package/dist/scss/mixins/_display.scss +0 -6
- package/dist/scss/mixins/_form.scss +0 -14
- package/dist/scss/mixins/_position.scss +0 -42
- package/dist/scss/mixins/_reset.scss +0 -17
- package/dist/scss/mixins/_responsive.scss +0 -88
- package/dist/scss/mixins/index.scss +0 -7
- package/dist/scss/modules/columns/_settings.scss +0 -1
- package/dist/scss/modules/columns/index.scss +0 -19
- package/dist/scss/modules/cursor/_settings.scss +0 -7
- package/dist/scss/modules/cursor/index.scss +0 -15
- package/dist/scss/modules/form/_settings.scss +0 -15
- package/dist/scss/modules/form/index.scss +0 -57
- package/dist/scss/modules/index.scss +0 -11
- package/dist/scss/modules/menu/_button.scss +0 -58
- package/dist/scss/modules/menu/_menu.scss +0 -25
- package/dist/scss/modules/menu/_settings.scss +0 -23
- package/dist/scss/modules/menu/index.scss +0 -3
- package/dist/scss/modules/pagination/_settings.scss +0 -6
- package/dist/scss/modules/pagination/index.scss +0 -24
- package/dist/scss/modules/popup/_settings.scss +0 -26
- package/dist/scss/modules/popup/index.scss +0 -294
- package/dist/scss/modules/preloader/_settings.scss +0 -3
- package/dist/scss/modules/preloader/index.scss +0 -19
- package/dist/scss/modules/scroll/_settings.scss +0 -22
- package/dist/scss/modules/scroll/index.scss +0 -94
- package/dist/scss/modules/select/_settings.scss +0 -28
- package/dist/scss/modules/select/index.scss +0 -142
- package/dist/scss/modules/slider/_settings.scss +0 -35
- package/dist/scss/modules/slider/index.scss +0 -153
- package/dist/scss/modules/text/_settings.scss +0 -1
- package/dist/scss/modules/text/index.scss +0 -19
- package/dist/types/types.d.ts +0 -18763
package/dist/js/SliderModule.js
DELETED
|
@@ -1,1062 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _Module2 = _interopRequireDefault(require("./Module"));
|
|
11
|
-
|
|
12
|
-
var _merge = _interopRequireDefault(require("./merge"));
|
|
13
|
-
|
|
14
|
-
var _timeoutCallback = _interopRequireDefault(require("./timeoutCallback"));
|
|
15
|
-
|
|
16
|
-
var _TimelineModule = _interopRequireDefault(require("./TimelineModule"));
|
|
17
|
-
|
|
18
|
-
var _easing = _interopRequireDefault(require("./easing"));
|
|
19
|
-
|
|
20
|
-
var _mathScopeProgress = _interopRequireDefault(require("./mathScopeProgress"));
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
|
|
26
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
-
|
|
28
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
29
|
-
|
|
30
|
-
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
|
31
|
-
|
|
32
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
33
|
-
|
|
34
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
|
-
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
|
|
38
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
|
-
|
|
40
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
41
|
-
|
|
42
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
-
|
|
44
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
|
-
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
|
-
|
|
48
|
-
var selectEl = require('select-el');
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @classdesc A class for creating sliders. This very class is to create content sliders. <br>
|
|
52
|
-
* Available targets:
|
|
53
|
-
* <ul>
|
|
54
|
-
* <li>first - first start if {@linkcode Vevet.SliderModule.Properties}.show is true.</li>
|
|
55
|
-
* <li>prev - when the previous slide is to be shown. Argument - {@linkcode Vevet.SliderModule.AnimationData}</li>
|
|
56
|
-
* <li>next - when the next slide is to be shown. Argument - {@linkcode Vevet.SliderModule.AnimationData}</li>
|
|
57
|
-
* <li>start - callbacks before the animation starts. Argument - {@linkcode Vevet.SliderModule.AnimationData}</li>
|
|
58
|
-
* <li>end - callbacks after the animations ends. Argument - {@linkcode Vevet.SliderModule.AnimationData}</li>
|
|
59
|
-
* <li>show - event on the moment when the active slide is to be shown.</li>
|
|
60
|
-
* <li>hide - event on the moment when the active slide is to be hidden.</li>
|
|
61
|
-
* <li>shown - shown.</li>
|
|
62
|
-
* <li>hidden - hidden.</li>
|
|
63
|
-
* <li>render - animation. Argument - {@linkcode Vevet.SliderModule.Render}</li>
|
|
64
|
-
* <li>timeline - timeline progress. Argument - {@linkcode Vevet.SliderModule.Timeline}</li>
|
|
65
|
-
* </ul>
|
|
66
|
-
* <br><br> <b>import {SliderModule} from 'vevet';</b>
|
|
67
|
-
*
|
|
68
|
-
* @vevetModuleCallback { Vevet.SliderModule : first : }
|
|
69
|
-
* @vevetModuleCallback { Vevet.SliderModule : prev : Vevet.SliderModule.AnimationData }
|
|
70
|
-
* @vevetModuleCallback { Vevet.SliderModule : next : Vevet.SliderModule.AnimationData }
|
|
71
|
-
* @vevetModuleCallback { Vevet.SliderModule : start : Vevet.SliderModule.AnimationData }
|
|
72
|
-
* @vevetModuleCallback { Vevet.SliderModule : end : Vevet.SliderModule.AnimationData }
|
|
73
|
-
* @vevetModuleCallback { Vevet.SliderModule : show : }
|
|
74
|
-
* @vevetModuleCallback { Vevet.SliderModule : hide : }
|
|
75
|
-
* @vevetModuleCallback { Vevet.SliderModule : shown : }
|
|
76
|
-
* @vevetModuleCallback { Vevet.SliderModule : hidden : }
|
|
77
|
-
* @vevetModuleCallback { Vevet.SliderModule : render : Vevet.SliderModule.Render }
|
|
78
|
-
* @vevetModuleCallback { Vevet.SliderModule : timeline : Vevet.SliderModule.Timeline }
|
|
79
|
-
*
|
|
80
|
-
* @class
|
|
81
|
-
* @memberof Vevet
|
|
82
|
-
* @augments Vevet.Module
|
|
83
|
-
* @requires Vevet.TimelineModule
|
|
84
|
-
*/
|
|
85
|
-
var SliderModule = /*#__PURE__*/function (_Module) {
|
|
86
|
-
_inherits(SliderModule, _Module);
|
|
87
|
-
|
|
88
|
-
var _super = _createSuper(SliderModule);
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @memberof Vevet.SliderModule
|
|
92
|
-
* @typedef {object} Properties
|
|
93
|
-
* @augments Vevet.Module.Properties
|
|
94
|
-
*
|
|
95
|
-
* @property {object} [selectors]
|
|
96
|
-
* @property {string|HTMLElement} [selectors.outer=.vevet-slider] - *** The outer of the slider.
|
|
97
|
-
* @property {string} [selectors.slides=.vevet-slider__slides] - *** The outer of slides.
|
|
98
|
-
* @property {string} [selectors.slide=.vevet-slider__slide] - *** Slide selector.
|
|
99
|
-
*
|
|
100
|
-
* @property {string} [direction=h] - Direction: h - horizontal, v - vertical.
|
|
101
|
-
* It defines direction of animation.
|
|
102
|
-
* @property {boolean} [loop=true] - Infinite loop sliding.
|
|
103
|
-
* @property {boolean} [show=true] - If the first slide is to be shown right after initializing the class.
|
|
104
|
-
* @property {boolean} [prev=true] - If switching to the previous slide is possible.
|
|
105
|
-
* @property {boolean} [next=true] - If switching to the next slide is possible.
|
|
106
|
-
* @property {boolean} [disabled=false] - If slide is disabled.
|
|
107
|
-
* @property {number} [active=0] - Active slide.
|
|
108
|
-
* @property {Array<Vevet.SliderModule>} [dependents] - Dependent sliders. Their slides will be changed
|
|
109
|
-
* when the main slider changes.
|
|
110
|
-
*
|
|
111
|
-
* @property {object} [animation]
|
|
112
|
-
* @property {number} [animation.duration=1500] - Duration of animation.
|
|
113
|
-
* @property {Array<number>} [animation.prev=[0, 0.5]] - Scope of animation of the previous slide.
|
|
114
|
-
* @property {Array<number>} [animation.next=[0.5, 1]] - Scope of animation of the next slide.
|
|
115
|
-
* @property {string|Array<number>|Function} [animation.easing] - Easing function.
|
|
116
|
-
* The default value is equal to {@linkcode Vevet.Application#easing}.
|
|
117
|
-
*
|
|
118
|
-
* @property {number} [resizeTimeout=0] - Timeout before sizes are updated when the window is resized.
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @alias Vevet.SliderModule
|
|
124
|
-
*
|
|
125
|
-
* @param {Vevet.SliderModule.Properties} [data]
|
|
126
|
-
*/
|
|
127
|
-
function SliderModule(data) {
|
|
128
|
-
_classCallCheck(this, SliderModule);
|
|
129
|
-
|
|
130
|
-
return _super.call(this, data);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
_createClass(SliderModule, [{
|
|
134
|
-
key: "prefix",
|
|
135
|
-
get: function get() {
|
|
136
|
-
return "".concat(this._v.prefix, "slider");
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @readonly
|
|
140
|
-
* @type {Vevet.SliderModule.Properties}
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
}, {
|
|
144
|
-
key: "defaultProp",
|
|
145
|
-
get: function get() {
|
|
146
|
-
var prefix = this._prefix;
|
|
147
|
-
return (0, _merge.default)(_get(_getPrototypeOf(SliderModule.prototype), "defaultProp", this), {
|
|
148
|
-
selectors: {
|
|
149
|
-
outer: ".".concat(prefix),
|
|
150
|
-
slides: ".".concat(prefix, "__slides"),
|
|
151
|
-
slide: ".".concat(prefix, "__slide")
|
|
152
|
-
},
|
|
153
|
-
direction: 'h',
|
|
154
|
-
loop: true,
|
|
155
|
-
show: true,
|
|
156
|
-
prev: true,
|
|
157
|
-
next: true,
|
|
158
|
-
disabled: false,
|
|
159
|
-
active: 0,
|
|
160
|
-
dependents: [],
|
|
161
|
-
animation: {
|
|
162
|
-
duration: 1500,
|
|
163
|
-
prev: [0, .5],
|
|
164
|
-
next: [.5, 1],
|
|
165
|
-
easing: this._vp.easing
|
|
166
|
-
},
|
|
167
|
-
resizeTimeout: 0
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @member Vevet.SliderModule#prop
|
|
172
|
-
* @memberof Vevet.SliderModule
|
|
173
|
-
* @readonly
|
|
174
|
-
* @type {Vevet.SliderModule.Properties}
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @member Vevet.SliderModule#_prop
|
|
179
|
-
* @memberof Vevet.SliderModule
|
|
180
|
-
* @protected
|
|
181
|
-
* @type {Vevet.SliderModule.Properties}
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @function Vevet.SliderModule#changeProp
|
|
186
|
-
* @memberof Vevet.SliderModule
|
|
187
|
-
* @param {Vevet.SliderModule.Properties} [prop]
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* @description Get slider outer.
|
|
192
|
-
* @readonly
|
|
193
|
-
* @type {HTMLElement}
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
}, {
|
|
197
|
-
key: "outer",
|
|
198
|
-
get: function get() {
|
|
199
|
-
return this._outer;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* @description If the slider is animating.
|
|
203
|
-
* @default false
|
|
204
|
-
* @readonly
|
|
205
|
-
* @type {boolean}
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
}, {
|
|
209
|
-
key: "playing",
|
|
210
|
-
get: function get() {
|
|
211
|
-
var playings = [this._playing];
|
|
212
|
-
|
|
213
|
-
this._prop.dependents.forEach(function (slider) {
|
|
214
|
-
playings.push(slider.playing);
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
return playings.includes(true);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @description Get active slide.
|
|
221
|
-
* @default 0
|
|
222
|
-
* @readonly
|
|
223
|
-
* @type {number}
|
|
224
|
-
*/
|
|
225
|
-
|
|
226
|
-
}, {
|
|
227
|
-
key: "active",
|
|
228
|
-
get: function get() {
|
|
229
|
-
return this._active;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* @description If active slide is shown.
|
|
233
|
-
* @default false
|
|
234
|
-
* @readonly
|
|
235
|
-
* @type {boolean}
|
|
236
|
-
*/
|
|
237
|
-
|
|
238
|
-
}, {
|
|
239
|
-
key: "shown",
|
|
240
|
-
get: function get() {
|
|
241
|
-
var showns = [this._shown];
|
|
242
|
-
|
|
243
|
-
this._prop.dependents.forEach(function (slider) {
|
|
244
|
-
showns.push(slider.shown);
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
if (showns.every(function (val, i, arr) {
|
|
248
|
-
return val === arr[0];
|
|
249
|
-
})) {
|
|
250
|
-
return this._shown;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @description Total amount of slides.
|
|
257
|
-
* @readonly
|
|
258
|
-
* @type {number}
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
}, {
|
|
262
|
-
key: "total",
|
|
263
|
-
get: function get() {
|
|
264
|
-
return this._total;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* @description Slides.
|
|
268
|
-
* @readonly
|
|
269
|
-
* @type {NodeList|Array<HTMLElement>}
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
|
-
}, {
|
|
273
|
-
key: "slides",
|
|
274
|
-
get: function get() {
|
|
275
|
-
return this._slides;
|
|
276
|
-
} // Extra constructor
|
|
277
|
-
|
|
278
|
-
}, {
|
|
279
|
-
key: "_extra",
|
|
280
|
-
value: function _extra() {
|
|
281
|
-
var _this = this;
|
|
282
|
-
|
|
283
|
-
_get(_getPrototypeOf(SliderModule.prototype), "_extra", this).call(this);
|
|
284
|
-
|
|
285
|
-
var prop = this._prop;
|
|
286
|
-
/**
|
|
287
|
-
* @description Total amount of slides.
|
|
288
|
-
* @protected
|
|
289
|
-
* @member {number}
|
|
290
|
-
*/
|
|
291
|
-
|
|
292
|
-
this._total = 0;
|
|
293
|
-
/**
|
|
294
|
-
* @description If the slider is animating.
|
|
295
|
-
* @protected
|
|
296
|
-
* @member {boolean}
|
|
297
|
-
*/
|
|
298
|
-
|
|
299
|
-
this._playing = false;
|
|
300
|
-
/**
|
|
301
|
-
* @description Active slide number.
|
|
302
|
-
* @protected
|
|
303
|
-
* @member {number}
|
|
304
|
-
*/
|
|
305
|
-
|
|
306
|
-
this._active = prop.active;
|
|
307
|
-
/**
|
|
308
|
-
* @description Previous active slide number.
|
|
309
|
-
* @protected
|
|
310
|
-
* @member {number}
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
this._activePrev = -1;
|
|
314
|
-
/**
|
|
315
|
-
* @description If the slider is shown.
|
|
316
|
-
* @protected
|
|
317
|
-
* @member {boolean}
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
|
-
this._shown = false;
|
|
321
|
-
/**
|
|
322
|
-
* @description Slider sizes with DPR. Width & Height
|
|
323
|
-
* @protected
|
|
324
|
-
* @member {Array<number>}
|
|
325
|
-
*/
|
|
326
|
-
|
|
327
|
-
this._size = [0, 0];
|
|
328
|
-
/**
|
|
329
|
-
* @description Timeline for animation
|
|
330
|
-
* @protected
|
|
331
|
-
* @member {false|Vevet.TimelineModule}
|
|
332
|
-
*/
|
|
333
|
-
|
|
334
|
-
this._timeline = false;
|
|
335
|
-
/**
|
|
336
|
-
* @type {Vevet.SliderModule.AnimationData}
|
|
337
|
-
* @protected
|
|
338
|
-
*/
|
|
339
|
-
|
|
340
|
-
this._animationData = {
|
|
341
|
-
direction: '',
|
|
342
|
-
prev: -1,
|
|
343
|
-
next: prop.active
|
|
344
|
-
}; // get elements
|
|
345
|
-
|
|
346
|
-
this._getElements(); // create other elements
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
this._createElements(); // sizes
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
this.setSize();
|
|
353
|
-
this.addEvent('viewport', {
|
|
354
|
-
target: '',
|
|
355
|
-
name: this._name,
|
|
356
|
-
do: function _do() {
|
|
357
|
-
(0, _timeoutCallback.default)(function () {
|
|
358
|
-
_this.setSize();
|
|
359
|
-
}, prop.resizeTimeout);
|
|
360
|
-
}
|
|
361
|
-
}); // show
|
|
362
|
-
|
|
363
|
-
this._firstStart();
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* @description First start.
|
|
367
|
-
* @protected
|
|
368
|
-
*/
|
|
369
|
-
|
|
370
|
-
}, {
|
|
371
|
-
key: "_firstStart",
|
|
372
|
-
value: function _firstStart() {
|
|
373
|
-
if (this._prop.show) {
|
|
374
|
-
this._shown = true;
|
|
375
|
-
this.lbt("first");
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
this._slidesClasses();
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* @description Get Elements.
|
|
382
|
-
* @protected
|
|
383
|
-
*/
|
|
384
|
-
|
|
385
|
-
}, {
|
|
386
|
-
key: "_getElements",
|
|
387
|
-
value: function _getElements() {
|
|
388
|
-
// get vars
|
|
389
|
-
var prop = this._prop,
|
|
390
|
-
selectors = prop.selectors,
|
|
391
|
-
prefix = this._prefix;
|
|
392
|
-
/**
|
|
393
|
-
* @description Slider outer.
|
|
394
|
-
* @protected
|
|
395
|
-
* @member {HTMLElement}
|
|
396
|
-
*/
|
|
397
|
-
|
|
398
|
-
this._outer = selectEl.one(selectors.outer);
|
|
399
|
-
/**
|
|
400
|
-
* @description Slides outer.
|
|
401
|
-
* @protected
|
|
402
|
-
* @member {HTMLElement}
|
|
403
|
-
*/
|
|
404
|
-
|
|
405
|
-
this._slidesOuter = this._outer.querySelector(selectors.slides);
|
|
406
|
-
/**
|
|
407
|
-
* @description Slides outer.
|
|
408
|
-
* @protected
|
|
409
|
-
* @member {Array<HTMLElement>|NodeList}
|
|
410
|
-
*/
|
|
411
|
-
|
|
412
|
-
this._slides = this._slidesOuter.querySelectorAll(selectors.slide); // get amount
|
|
413
|
-
|
|
414
|
-
this._total = this._slides.length; // set classes
|
|
415
|
-
|
|
416
|
-
this._outer.classList.add(prefix);
|
|
417
|
-
|
|
418
|
-
this._slidesOuter.classList.add("".concat(prefix, "__slides"));
|
|
419
|
-
|
|
420
|
-
for (var i = 0; i < this._total; i++) {
|
|
421
|
-
this._slides[i].classList.add("".concat(prefix, "__slide"));
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* @description Create elements.
|
|
426
|
-
* @protected
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
}, {
|
|
430
|
-
key: "_createElements",
|
|
431
|
-
value: function _createElements() {}
|
|
432
|
-
/**
|
|
433
|
-
* @description Change slides classes. Set active Slide class.
|
|
434
|
-
* @param {number} num - Index of the slide.
|
|
435
|
-
* @protected
|
|
436
|
-
*/
|
|
437
|
-
|
|
438
|
-
}, {
|
|
439
|
-
key: "_slidesClasses",
|
|
440
|
-
value: function _slidesClasses() {
|
|
441
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._active;
|
|
442
|
-
var activeClass = "".concat(this._prefix, "__slide_active");
|
|
443
|
-
|
|
444
|
-
for (var i = 0; i < this._total; i++) {
|
|
445
|
-
if (i === num) {
|
|
446
|
-
this._slides[i].classList.add(activeClass);
|
|
447
|
-
} else {
|
|
448
|
-
this._slides[i].classList.remove(activeClass);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* @description Update size values.
|
|
454
|
-
*/
|
|
455
|
-
|
|
456
|
-
}, {
|
|
457
|
-
key: "setSize",
|
|
458
|
-
value: function setSize() {
|
|
459
|
-
// size
|
|
460
|
-
var size = this._getSize();
|
|
461
|
-
/**
|
|
462
|
-
* @description Width of the slider outer element.
|
|
463
|
-
* @protected
|
|
464
|
-
* @member {number}
|
|
465
|
-
*/
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this._width = size[0];
|
|
469
|
-
/**
|
|
470
|
-
* @description Height of the slider outer element.
|
|
471
|
-
* @protected
|
|
472
|
-
* @member {number}
|
|
473
|
-
*/
|
|
474
|
-
|
|
475
|
-
this._height = size[1]; // update dpr
|
|
476
|
-
|
|
477
|
-
this._dprGet();
|
|
478
|
-
|
|
479
|
-
var dpr = this._dpr; // update size
|
|
480
|
-
|
|
481
|
-
this._size = [this._width * dpr, this._height * dpr];
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* @description Get slider outer element sizes
|
|
485
|
-
* @protected
|
|
486
|
-
* @returns {Array<number>} Returns an width & height.
|
|
487
|
-
*/
|
|
488
|
-
|
|
489
|
-
}, {
|
|
490
|
-
key: "_getSize",
|
|
491
|
-
value: function _getSize() {
|
|
492
|
-
var outer = this._outer;
|
|
493
|
-
return [outer.clientWidth, outer.clientHeight];
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* @description Update device pixel ratio.
|
|
497
|
-
* @protected
|
|
498
|
-
*/
|
|
499
|
-
|
|
500
|
-
}, {
|
|
501
|
-
key: "_dprGet",
|
|
502
|
-
value: function _dprGet() {
|
|
503
|
-
/**
|
|
504
|
-
* @description Device pixel ratio.
|
|
505
|
-
* @protected
|
|
506
|
-
* @member {number}
|
|
507
|
-
*/
|
|
508
|
-
this._dpr = this._v.viewport.dprMobile;
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* @description Get index of the slide.
|
|
512
|
-
* @param {number} [num] - Reference slide number.
|
|
513
|
-
* Negative values are also possible.
|
|
514
|
-
* @protected
|
|
515
|
-
*/
|
|
516
|
-
|
|
517
|
-
}, {
|
|
518
|
-
key: "getSlideIndex",
|
|
519
|
-
value: function getSlideIndex() {
|
|
520
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._active;
|
|
521
|
-
var total = this._total - 1;
|
|
522
|
-
|
|
523
|
-
if (num > 0) {
|
|
524
|
-
if (num > total) {
|
|
525
|
-
num = this.getSlideIndex(num - this._total);
|
|
526
|
-
}
|
|
527
|
-
} else if (num < 0) {
|
|
528
|
-
if (num < this._total * -1) {
|
|
529
|
-
num = this.getSlideIndex(num + this._total);
|
|
530
|
-
} else {
|
|
531
|
-
num = this._total + num;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
return num;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* @description Get a slide index relative to another one.
|
|
539
|
-
* @param {number} [num] - Reference slide number.
|
|
540
|
-
* @param {number} [skip] - How many slides to skip.
|
|
541
|
-
* Negative values are also possible.
|
|
542
|
-
* @protected
|
|
543
|
-
*/
|
|
544
|
-
|
|
545
|
-
}, {
|
|
546
|
-
key: "getFollowingSlideIndex",
|
|
547
|
-
value: function getFollowingSlideIndex() {
|
|
548
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._active;
|
|
549
|
-
var skip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
550
|
-
num += skip;
|
|
551
|
-
num = this.getSlideIndex(num);
|
|
552
|
-
return num;
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* @description Go to the previous slide.
|
|
556
|
-
* @returns {boolean} Returns true if successful.
|
|
557
|
-
*/
|
|
558
|
-
|
|
559
|
-
}, {
|
|
560
|
-
key: "prev",
|
|
561
|
-
value: function prev() {
|
|
562
|
-
if (this.playing || !this._prop.prev) {
|
|
563
|
-
return false;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
var num = this.prevGet();
|
|
567
|
-
|
|
568
|
-
if (num === false) {
|
|
569
|
-
return false;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
this.set(num, 'prev');
|
|
573
|
-
return true;
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* @description Get the previous slide number.
|
|
577
|
-
* @param {number} [num] - Reference slide num.
|
|
578
|
-
* @returns {number} Previous slide.
|
|
579
|
-
* @protected
|
|
580
|
-
*/
|
|
581
|
-
|
|
582
|
-
}, {
|
|
583
|
-
key: "prevGet",
|
|
584
|
-
value: function prevGet() {
|
|
585
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._active;
|
|
586
|
-
|
|
587
|
-
if (!this._prop.loop) {
|
|
588
|
-
if (num === 0) {
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
return this.getFollowingSlideIndex(num, -1);
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* @description Go to the next slide.
|
|
597
|
-
* @returns {boolean} Returns true if successful.
|
|
598
|
-
*/
|
|
599
|
-
|
|
600
|
-
}, {
|
|
601
|
-
key: "next",
|
|
602
|
-
value: function next() {
|
|
603
|
-
if (this.playing || !this._prop.next) {
|
|
604
|
-
return false;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
var num = this.nextGet();
|
|
608
|
-
|
|
609
|
-
if (num === false) {
|
|
610
|
-
return false;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
this.set(num, 'next');
|
|
614
|
-
return true;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* @description Get the next slide number.
|
|
618
|
-
* @param {number} [num] - Reference slide num.
|
|
619
|
-
* @returns {number} Next slide.
|
|
620
|
-
*/
|
|
621
|
-
|
|
622
|
-
}, {
|
|
623
|
-
key: "nextGet",
|
|
624
|
-
value: function nextGet() {
|
|
625
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._active;
|
|
626
|
-
|
|
627
|
-
if (!this._prop.loop) {
|
|
628
|
-
if (num === this._total < 1) {
|
|
629
|
-
return false;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
return this.getFollowingSlideIndex(num, 1);
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* @description Create and launch a timeline
|
|
637
|
-
* @protected
|
|
638
|
-
*
|
|
639
|
-
* @param {Function} progressCallback
|
|
640
|
-
* @param {Function} endCallback
|
|
641
|
-
* @param {Array<number>} [scope=[0, 1]] - Animation scope.
|
|
642
|
-
*/
|
|
643
|
-
|
|
644
|
-
}, {
|
|
645
|
-
key: "_launchTimeline",
|
|
646
|
-
value: function _launchTimeline() {
|
|
647
|
-
var progressCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
|
|
648
|
-
var endCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
649
|
-
var scope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 1];
|
|
650
|
-
// create a timeline animation
|
|
651
|
-
this._timeline = new _TimelineModule.default();
|
|
652
|
-
var timeline = this._timeline; // add progress callbacks
|
|
653
|
-
|
|
654
|
-
timeline.add({
|
|
655
|
-
target: 'progress',
|
|
656
|
-
do: progressCallback.bind(this)
|
|
657
|
-
}); // end callback
|
|
658
|
-
|
|
659
|
-
timeline.add({
|
|
660
|
-
target: 'end',
|
|
661
|
-
do: endCallback.bind(this)
|
|
662
|
-
}); // launch timeline
|
|
663
|
-
|
|
664
|
-
timeline.play({
|
|
665
|
-
duration: this._prop.animation.duration,
|
|
666
|
-
autoDuration: true,
|
|
667
|
-
easing: 'linear',
|
|
668
|
-
scope: scope
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* @description Stop and destroy the animation timeline
|
|
673
|
-
* @protected
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
|
-
}, {
|
|
677
|
-
key: "_stopTimeline",
|
|
678
|
-
value: function _stopTimeline() {
|
|
679
|
-
if (this._timeline) {
|
|
680
|
-
this._timeline.destroy();
|
|
681
|
-
|
|
682
|
-
this._timeline = false;
|
|
683
|
-
this._playing = false;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* @description Show the active slide.
|
|
688
|
-
* @returns {boolean} Returns true if successful.
|
|
689
|
-
*/
|
|
690
|
-
|
|
691
|
-
}, {
|
|
692
|
-
key: "show",
|
|
693
|
-
value: function show() {
|
|
694
|
-
if (this.playing || this._prop.disabled) {
|
|
695
|
-
return false;
|
|
696
|
-
} // show dependents
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
this._prop.dependents.forEach(function (slider) {
|
|
700
|
-
slider.show();
|
|
701
|
-
}); // return if this very slider is shown
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
if (this._shown) {
|
|
705
|
-
return false;
|
|
706
|
-
} // continue
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
this._shown = true;
|
|
710
|
-
|
|
711
|
-
this._outer.classList.add("".concat(this._prefix, "_shown")); // change helpers & classes
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
this._slidesClasses(); // animation
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
this._showHide("show");
|
|
718
|
-
|
|
719
|
-
return true;
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* @description Hide the active slide.
|
|
723
|
-
* @returns {boolean} Returns true if successful.
|
|
724
|
-
*/
|
|
725
|
-
|
|
726
|
-
}, {
|
|
727
|
-
key: "hide",
|
|
728
|
-
value: function hide() {
|
|
729
|
-
if (this.playing || this._prop.disabled) {
|
|
730
|
-
return false;
|
|
731
|
-
} // hide dependents
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
this._prop.dependents.forEach(function (slider) {
|
|
735
|
-
slider.hide();
|
|
736
|
-
}); // return if this very slider is not shown
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
if (!this._shown) {
|
|
740
|
-
return false;
|
|
741
|
-
} // continue
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
this._shown = false;
|
|
745
|
-
|
|
746
|
-
this._outer.classList.remove("".concat(this._prefix, "_shown")); // change helpers & classes
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
this._slidesClasses(-1); // animation
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
this._showHide("hide");
|
|
753
|
-
|
|
754
|
-
return true;
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* @description Show/Hide method helper.
|
|
758
|
-
* @param {string} action - Name of the action: show/hide.
|
|
759
|
-
*/
|
|
760
|
-
|
|
761
|
-
}, {
|
|
762
|
-
key: "_showHide",
|
|
763
|
-
value: function _showHide(action) {
|
|
764
|
-
// callback
|
|
765
|
-
this.lbt(action); // change vars
|
|
766
|
-
|
|
767
|
-
this._playing = true; // create timeline animation object
|
|
768
|
-
|
|
769
|
-
this._animationData = {
|
|
770
|
-
prev: this._active,
|
|
771
|
-
next: this._active,
|
|
772
|
-
direction: action
|
|
773
|
-
}; // launch timelime
|
|
774
|
-
|
|
775
|
-
this._launchTimeline(this._showHideProgress.bind(this), this._showHideEnd.bind(this));
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* @description Progress callback for the "show/hide" timeline.
|
|
779
|
-
* @param {Vevet.TimelineModule.Data} p - Progress data.
|
|
780
|
-
* @protected
|
|
781
|
-
*/
|
|
782
|
-
|
|
783
|
-
}, {
|
|
784
|
-
key: "_showHideProgress",
|
|
785
|
-
value: function _showHideProgress(p) {
|
|
786
|
-
this._animateSlidesTimeline(p);
|
|
787
|
-
|
|
788
|
-
this._animateSlide(this._animationData.direction, p);
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* @description End callback for the "show/hide" timeline.
|
|
792
|
-
* @protected
|
|
793
|
-
*/
|
|
794
|
-
|
|
795
|
-
}, {
|
|
796
|
-
key: "_showHideEnd",
|
|
797
|
-
value: function _showHideEnd() {
|
|
798
|
-
this._animationEnd();
|
|
799
|
-
|
|
800
|
-
if (this._animationData.direction == 'show') {
|
|
801
|
-
this.lbt("shown");
|
|
802
|
-
} else {
|
|
803
|
-
this.lbt("hidden");
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
this._stopTimeline();
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* @memberof Vevet.SliderModule
|
|
810
|
-
* @typedef {object} AnimationData
|
|
811
|
-
* @property {string} direction - Direction of action: prev or next.
|
|
812
|
-
* @property {number} prev - Previous slide number.
|
|
813
|
-
* @property {number} next - Next slide number.
|
|
814
|
-
*/
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* @description CHange slide.
|
|
818
|
-
*
|
|
819
|
-
* @param {number} [num=0] - Slide index number.
|
|
820
|
-
* @param {string} [direction=none] - Direction of action: prev or next.
|
|
821
|
-
*
|
|
822
|
-
* @returns {boolean} - Returns true if successful.
|
|
823
|
-
*/
|
|
824
|
-
|
|
825
|
-
}, {
|
|
826
|
-
key: "set",
|
|
827
|
-
value: function set() {
|
|
828
|
-
var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
829
|
-
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none';
|
|
830
|
-
|
|
831
|
-
// if available
|
|
832
|
-
if (this.playing || this._prop.disabled) {
|
|
833
|
-
return false;
|
|
834
|
-
} // change slides for dependents
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
this._prop.dependents.forEach(function (slider) {
|
|
838
|
-
slider.set(num, direction);
|
|
839
|
-
}); // check if shown
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
if (!this._shown) {
|
|
843
|
-
return false;
|
|
844
|
-
} // check index number
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
if (this._active === num) {
|
|
848
|
-
return false;
|
|
849
|
-
} // change active
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
this._activePrev = this._active;
|
|
853
|
-
this._active = num; // change slides classes
|
|
854
|
-
|
|
855
|
-
this._slidesClasses(); // get right direction
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
if (direction === 'none') {
|
|
859
|
-
if (this._active > this._activePrev) {
|
|
860
|
-
direction = 'next';
|
|
861
|
-
} else {
|
|
862
|
-
direction = 'prev';
|
|
863
|
-
}
|
|
864
|
-
} // launch callbacks
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
this._launchCallbacks(direction); // animate
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
this._animate(direction); // success
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
return true;
|
|
874
|
-
}
|
|
875
|
-
}, {
|
|
876
|
-
key: "_launchCallbacks",
|
|
877
|
-
value: function _launchCallbacks() {
|
|
878
|
-
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
879
|
-
// Get object for callbacks - {@linkcode Vevet.SliderModule.AnimationData}.
|
|
880
|
-
this._animationData = {
|
|
881
|
-
direction: direction,
|
|
882
|
-
prev: this._activePrev,
|
|
883
|
-
next: this._active
|
|
884
|
-
};
|
|
885
|
-
var obj = this._animationData; // prev or next callback
|
|
886
|
-
|
|
887
|
-
this.lbt(direction, obj);
|
|
888
|
-
this.lbt("start", obj);
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* @description Animate slides.
|
|
892
|
-
* @param {string} direction - Direction of action: prev or next.
|
|
893
|
-
* @param {Array<number>} [scope=[0, 1]] - Animation scope.
|
|
894
|
-
* @protected
|
|
895
|
-
*/
|
|
896
|
-
|
|
897
|
-
}, {
|
|
898
|
-
key: "_animate",
|
|
899
|
-
value: function _animate() {
|
|
900
|
-
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
901
|
-
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 1];
|
|
902
|
-
// change vars
|
|
903
|
-
this._playing = true; // Set object for callbacks
|
|
904
|
-
|
|
905
|
-
this._animationData = {
|
|
906
|
-
direction: direction,
|
|
907
|
-
prev: this._activePrev,
|
|
908
|
-
next: this._active
|
|
909
|
-
}; // launch timelime
|
|
910
|
-
|
|
911
|
-
this._launchTimeline(this._animateSlides.bind(this), this._animateEnd.bind(this), scope);
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* @description Slides animation. Here we split animation into two parts:
|
|
915
|
-
* animation of the previous & of the next slide.
|
|
916
|
-
* @param {Vevet.TimelineModule.Data} p - Progress data.
|
|
917
|
-
* @protected
|
|
918
|
-
*/
|
|
919
|
-
|
|
920
|
-
}, {
|
|
921
|
-
key: "_animateSlides",
|
|
922
|
-
value: function _animateSlides(p) {
|
|
923
|
-
// timeline
|
|
924
|
-
this._animateSlidesTimeline(p); // animate the previous & next slide
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
this._animateSlide('prev', p);
|
|
928
|
-
|
|
929
|
-
this._animateSlide('next', p);
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* @memberof Vevet.SliderModule
|
|
933
|
-
* @typedef {object} Timeline
|
|
934
|
-
* @augments Vevet.SliderModule.AnimationData
|
|
935
|
-
* @property {number} p - Progress without easing.
|
|
936
|
-
*/
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* @description Timeline animation.
|
|
940
|
-
* @param {Vevet.TimelineModule.Data} p - Progress data.
|
|
941
|
-
* @protected
|
|
942
|
-
*/
|
|
943
|
-
|
|
944
|
-
}, {
|
|
945
|
-
key: "_animateSlidesTimeline",
|
|
946
|
-
value: function _animateSlidesTimeline(p) {
|
|
947
|
-
// the methods above will call the event "render" twice
|
|
948
|
-
// perhaps, you will need to have a single render event that will not depend on slide animation props.
|
|
949
|
-
var data = (0, _merge.default)({
|
|
950
|
-
p: p.se
|
|
951
|
-
}, this._animationData); // calculate
|
|
952
|
-
|
|
953
|
-
this.lbt("timeline", data);
|
|
954
|
-
}
|
|
955
|
-
/**
|
|
956
|
-
* @description Animate a slide
|
|
957
|
-
* @param {string} type - Slide type: show|hide|prev|next.
|
|
958
|
-
* @param {Vevet.TimelineModule.Data} p - Progress data.
|
|
959
|
-
* @protected
|
|
960
|
-
*/
|
|
961
|
-
|
|
962
|
-
}, {
|
|
963
|
-
key: "_animateSlide",
|
|
964
|
-
value: function _animateSlide(type, p) {
|
|
965
|
-
var obj = this._animationData; // get animation scope
|
|
966
|
-
|
|
967
|
-
var scope = this._prop.animation[type];
|
|
968
|
-
|
|
969
|
-
if (typeof scope == "undefined") {
|
|
970
|
-
scope = [0, 1];
|
|
971
|
-
} // get type progress
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
var progress = (0, _mathScopeProgress.default)(p.se, scope);
|
|
975
|
-
|
|
976
|
-
if (progress < 0) {
|
|
977
|
-
progress = 0;
|
|
978
|
-
} else if (progress > 1) {
|
|
979
|
-
progress = 1;
|
|
980
|
-
} else {
|
|
981
|
-
progress = (0, _easing.default)(progress, this._prop.animation.easing);
|
|
982
|
-
} // Create Animation Data, {@linkcode Vevet.SliderModule.Render}.
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
var data = (0, _merge.default)({
|
|
986
|
-
p: progress,
|
|
987
|
-
num: type === 'prev' ? obj.prev : obj.next,
|
|
988
|
-
type: type
|
|
989
|
-
}, obj); // render
|
|
990
|
-
|
|
991
|
-
this._render(data);
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
* @memberof Vevet.SliderModule
|
|
995
|
-
* @typedef {object} Render
|
|
996
|
-
* @augments Vevet.SliderModule.AnimationData
|
|
997
|
-
* @property {number} p - Progress of animation.
|
|
998
|
-
* @property {number} num - Index number of the slide under animation.
|
|
999
|
-
* @property {string} type - What type of a slide is under animation: prev|next|show|hide.
|
|
1000
|
-
*/
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* @description Animation rendering.
|
|
1004
|
-
* @param {Vevet.SliderModule.Render} data - Animation data.
|
|
1005
|
-
* @protected
|
|
1006
|
-
*/
|
|
1007
|
-
|
|
1008
|
-
}, {
|
|
1009
|
-
key: "_render",
|
|
1010
|
-
value: function _render(data) {
|
|
1011
|
-
// reder callback
|
|
1012
|
-
this.lbt("render", data);
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* @description End of animation.
|
|
1016
|
-
* @protected
|
|
1017
|
-
*/
|
|
1018
|
-
|
|
1019
|
-
}, {
|
|
1020
|
-
key: "_animateEnd",
|
|
1021
|
-
value: function _animateEnd() {
|
|
1022
|
-
this._stopTimeline();
|
|
1023
|
-
|
|
1024
|
-
this._animationEnd();
|
|
1025
|
-
|
|
1026
|
-
this.lbt("end", this._animationData);
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* @description When animation has stopped.
|
|
1030
|
-
* @protected
|
|
1031
|
-
*/
|
|
1032
|
-
|
|
1033
|
-
}, {
|
|
1034
|
-
key: "_animationEnd",
|
|
1035
|
-
value: function _animationEnd() {
|
|
1036
|
-
this._playing = false;
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* @description Destroy the class.
|
|
1040
|
-
*/
|
|
1041
|
-
|
|
1042
|
-
}, {
|
|
1043
|
-
key: "destroy",
|
|
1044
|
-
value: function destroy() {
|
|
1045
|
-
_get(_getPrototypeOf(SliderModule.prototype), "destroy", this).call(this);
|
|
1046
|
-
|
|
1047
|
-
var prefix = this._prefix; // remove classes
|
|
1048
|
-
|
|
1049
|
-
this._outer.classList.remove(prefix);
|
|
1050
|
-
|
|
1051
|
-
this._slidesOuter.classList.remove("".concat(prefix, "__slides"));
|
|
1052
|
-
|
|
1053
|
-
for (var i = 0; i < this._total; i++) {
|
|
1054
|
-
this._slides[i].classList.remove("".concat(prefix, "__slide"));
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
}]);
|
|
1058
|
-
|
|
1059
|
-
return SliderModule;
|
|
1060
|
-
}(_Module2.default);
|
|
1061
|
-
|
|
1062
|
-
exports.default = SliderModule;
|