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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Module } from './Module';
|
|
2
|
+
/**
|
|
3
|
+
* A class for Components.
|
|
4
|
+
*/
|
|
5
|
+
export class Component extends Module {
|
|
6
|
+
/**
|
|
7
|
+
* Add a single plugin
|
|
8
|
+
*/
|
|
9
|
+
addPlugin(plugin) {
|
|
10
|
+
if (typeof this._plugins === 'undefined') {
|
|
11
|
+
this._plugins = [];
|
|
12
|
+
}
|
|
13
|
+
this._plugins.push(plugin);
|
|
14
|
+
if (!plugin.inited) {
|
|
15
|
+
plugin.initPlugin(this);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Destroy all plugins
|
|
20
|
+
*/
|
|
21
|
+
_destroyPlugins() {
|
|
22
|
+
if (this._plugins) {
|
|
23
|
+
this._plugins.forEach((plugin) => {
|
|
24
|
+
plugin.destroy();
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
_destroy() {
|
|
29
|
+
super._destroy();
|
|
30
|
+
this._destroyPlugins();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { addEventListener, } from 'vevet-dom';
|
|
2
|
+
import { Callbacks } from './Callbacks';
|
|
3
|
+
import { MutableProp } from './MutableProp';
|
|
4
|
+
import mergeWithoutArrays from '../utils/common/mergeWithoutArrays';
|
|
5
|
+
import { throwVevetAppError } from '../utils/errors';
|
|
6
|
+
/**
|
|
7
|
+
* A class for modules.
|
|
8
|
+
*/
|
|
9
|
+
export class Module {
|
|
10
|
+
/**
|
|
11
|
+
* @example
|
|
12
|
+
* const mod = new Module();
|
|
13
|
+
*/
|
|
14
|
+
constructor(
|
|
15
|
+
/**
|
|
16
|
+
* Properties on script start
|
|
17
|
+
*/
|
|
18
|
+
initialProp,
|
|
19
|
+
/**
|
|
20
|
+
* Defines if you need to call {@linkcode Module.init} at the constructor's end.
|
|
21
|
+
* If you want to add responsive properties, set this argument to FALSE.
|
|
22
|
+
*/
|
|
23
|
+
init = true) {
|
|
24
|
+
/**
|
|
25
|
+
* If the module is initialized
|
|
26
|
+
*/
|
|
27
|
+
this._inited = false;
|
|
28
|
+
/**
|
|
29
|
+
* Viewport callbacks
|
|
30
|
+
*/
|
|
31
|
+
this._viewportCallbacks = [];
|
|
32
|
+
// set vars
|
|
33
|
+
if (window.vevetApp) {
|
|
34
|
+
this._app = window.vevetApp;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throwVevetAppError();
|
|
38
|
+
}
|
|
39
|
+
// set default vars
|
|
40
|
+
this._destroyed = false;
|
|
41
|
+
this._listeners = [];
|
|
42
|
+
// create callbacks
|
|
43
|
+
this._callbacks = new Callbacks();
|
|
44
|
+
// create mutable properties
|
|
45
|
+
const prop = mergeWithoutArrays(this._getDefaultProp(), initialProp || {});
|
|
46
|
+
this._mutableProp = new MutableProp(prop, this._onPropResponsive.bind(this), this._onPropChange.bind(this), this.name);
|
|
47
|
+
if (init) {
|
|
48
|
+
this.init();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get Default properties (should be extended)
|
|
53
|
+
*/
|
|
54
|
+
_getDefaultProp() {
|
|
55
|
+
return {
|
|
56
|
+
parent: false,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Current properties
|
|
61
|
+
*/
|
|
62
|
+
get prop() {
|
|
63
|
+
return this._mutableProp.prop;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Module Callbacks
|
|
67
|
+
*/
|
|
68
|
+
get callbacks() {
|
|
69
|
+
return this._callbacks;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Module prefix
|
|
73
|
+
*/
|
|
74
|
+
get prefix() {
|
|
75
|
+
return '';
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get module name
|
|
79
|
+
*/
|
|
80
|
+
get name() {
|
|
81
|
+
return this.constructor.name;
|
|
82
|
+
}
|
|
83
|
+
get inited() {
|
|
84
|
+
return this._inited;
|
|
85
|
+
}
|
|
86
|
+
get destroyed() {
|
|
87
|
+
return this._destroyed;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Add responsive rules
|
|
91
|
+
*/
|
|
92
|
+
addResponsiveProp(rules) {
|
|
93
|
+
if (this._inited) {
|
|
94
|
+
throw new Error('Responsive properties cannot be added because the class instance is already initialized');
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this._mutableProp.addResponsiveProp(rules);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Change module properties.
|
|
102
|
+
* @example
|
|
103
|
+
*
|
|
104
|
+
* // changing properties
|
|
105
|
+
* // let's imagine that the module has the following properties:
|
|
106
|
+
* prop = {
|
|
107
|
+
* name: 'module',
|
|
108
|
+
* cute: true
|
|
109
|
+
* };
|
|
110
|
+
* // we can change some properties in it: whether one or several properties
|
|
111
|
+
* // after the properties are changed, the method _onPropChange is called.
|
|
112
|
+
* module.changeProp({
|
|
113
|
+
* cute: false
|
|
114
|
+
* });
|
|
115
|
+
*/
|
|
116
|
+
changeProp(prop = {}) {
|
|
117
|
+
this._mutableProp.changeProp(prop);
|
|
118
|
+
this._callbacks.tbt('changeProp', false);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The method that is called on window resize and properties change.
|
|
122
|
+
*/
|
|
123
|
+
_onPropResponsive() {
|
|
124
|
+
this._onPropMutate();
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The method that is called on properties change.
|
|
128
|
+
*/
|
|
129
|
+
_onPropChange(
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
131
|
+
changedProp) {
|
|
132
|
+
this._onPropMutate();
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The method that is called on properties change.
|
|
136
|
+
*/
|
|
137
|
+
_onPropMutate() { }
|
|
138
|
+
/**
|
|
139
|
+
* Initializes the class.
|
|
140
|
+
*/
|
|
141
|
+
init() {
|
|
142
|
+
// return if the module is already initialized
|
|
143
|
+
if (this._inited) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this._inited = true;
|
|
147
|
+
// continue initializing
|
|
148
|
+
this._constructor();
|
|
149
|
+
this._setEvents();
|
|
150
|
+
// destroy the current module on parent destroy
|
|
151
|
+
if (this.prop.parent) {
|
|
152
|
+
this.prop.parent.addCallback('destroy', () => {
|
|
153
|
+
this.destroy();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Extra constructor
|
|
159
|
+
*/
|
|
160
|
+
_constructor() {
|
|
161
|
+
// code
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Set events
|
|
165
|
+
*/
|
|
166
|
+
_setEvents() {
|
|
167
|
+
// code
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Add a viewport callback that will be removed on class destroy
|
|
171
|
+
* {@see Viewport}
|
|
172
|
+
*/
|
|
173
|
+
addViewportCallback(target, func, data = {
|
|
174
|
+
name: this.constructor.name,
|
|
175
|
+
}) {
|
|
176
|
+
const callback = this._app.viewport.add(target, func, data);
|
|
177
|
+
this._viewportCallbacks.push(callback);
|
|
178
|
+
return callback;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Add a module callback
|
|
182
|
+
* {@see Callbacks}
|
|
183
|
+
*/
|
|
184
|
+
addCallback(target, func, data = {}) {
|
|
185
|
+
const callback = this.callbacks.add(target, func, data);
|
|
186
|
+
return callback;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Add a DOM event listeners
|
|
190
|
+
*/
|
|
191
|
+
addEventListeners(el, target, callback, options) {
|
|
192
|
+
const listener = addEventListener(el, target, callback, options);
|
|
193
|
+
this._listeners.push(listener);
|
|
194
|
+
return listener;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Destroy the module
|
|
198
|
+
*/
|
|
199
|
+
destroy() {
|
|
200
|
+
if (this.destroyed) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this._destroy();
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Destroy the module
|
|
207
|
+
*/
|
|
208
|
+
_destroy() {
|
|
209
|
+
// destroy callbacks
|
|
210
|
+
this._callbacks.tbt('destroy', false);
|
|
211
|
+
this._callbacks.destroy();
|
|
212
|
+
// destroy mutable properties
|
|
213
|
+
this._mutableProp.destroy();
|
|
214
|
+
// destroy viewport callbacks
|
|
215
|
+
this._viewportCallbacks.forEach((callback) => {
|
|
216
|
+
callback.remove();
|
|
217
|
+
});
|
|
218
|
+
// destroy all listeners
|
|
219
|
+
this._listeners.forEach((listener) => {
|
|
220
|
+
listener.remove();
|
|
221
|
+
});
|
|
222
|
+
// events
|
|
223
|
+
this._destroyed = true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { mergeWithoutArrays } from '../utils/common';
|
|
2
|
+
/**
|
|
3
|
+
* A class for creating mutable properties that can change on window resize. <br><br>
|
|
4
|
+
*
|
|
5
|
+
* There are two ways to change properties:
|
|
6
|
+
* <ul>
|
|
7
|
+
* <li>
|
|
8
|
+
* To set a resize-listener on window (or use {@linkcode Viewport}).
|
|
9
|
+
* When the window is resized, change the properties with the help of
|
|
10
|
+
* {@linkcode MutableProp.changeProp}</li>
|
|
11
|
+
* <li>
|
|
12
|
+
* The second way is to use the MutableProp and add responsive properties
|
|
13
|
+
* with help of {@linkcode MutableProp.addResponsiveProp}.</li>
|
|
14
|
+
* </ul>
|
|
15
|
+
*/
|
|
16
|
+
export class MutableProp {
|
|
17
|
+
/**
|
|
18
|
+
* @example
|
|
19
|
+
* const static = {
|
|
20
|
+
* myProp: true,
|
|
21
|
+
* };
|
|
22
|
+
* const responsive = [
|
|
23
|
+
* {
|
|
24
|
+
* breakpoint: 'm',
|
|
25
|
+
* settings: {
|
|
26
|
+
* myProp: false
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ];
|
|
30
|
+
* const prop = new MutableProp(static, responsive);
|
|
31
|
+
*/
|
|
32
|
+
constructor(
|
|
33
|
+
/**
|
|
34
|
+
* The properties that were set while initialization.
|
|
35
|
+
* These properties do not change throughout time.
|
|
36
|
+
*/
|
|
37
|
+
_initProp,
|
|
38
|
+
/**
|
|
39
|
+
* A callback that is launched when properties are changed on window resize
|
|
40
|
+
*/
|
|
41
|
+
_onResponsive = () => { },
|
|
42
|
+
/**
|
|
43
|
+
* A callback that is launched when properties are changed
|
|
44
|
+
* through {@linkcode MutableProp.changeProp}
|
|
45
|
+
*/
|
|
46
|
+
_onChange = () => { },
|
|
47
|
+
/**
|
|
48
|
+
* Name of the responsive properties.
|
|
49
|
+
*/
|
|
50
|
+
_name = 'Responsive Prop') {
|
|
51
|
+
this._initProp = _initProp;
|
|
52
|
+
this._onResponsive = _onResponsive;
|
|
53
|
+
this._onChange = _onChange;
|
|
54
|
+
this._name = _name;
|
|
55
|
+
/**
|
|
56
|
+
* A set of responsive rules
|
|
57
|
+
*/
|
|
58
|
+
this._responsiveRules = [];
|
|
59
|
+
this._app = window.vevetApp;
|
|
60
|
+
this._refProp = mergeWithoutArrays({}, _initProp);
|
|
61
|
+
this._prop = mergeWithoutArrays({}, _initProp);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get current properties
|
|
65
|
+
*/
|
|
66
|
+
get prop() {
|
|
67
|
+
return this._prop;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Add responsive rules
|
|
71
|
+
*/
|
|
72
|
+
addResponsiveProp(rules) {
|
|
73
|
+
this._responsiveRules.push(rules);
|
|
74
|
+
// add event on resize
|
|
75
|
+
if (typeof this._viewportCallback === 'undefined') {
|
|
76
|
+
this._viewportCallback = this._app.viewport.add('w', this._responseProp.bind(this, true), {
|
|
77
|
+
name: this._name,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
// change properties according to the responsive prop
|
|
81
|
+
this._responseProp();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Change properties according to the "responsive" settings
|
|
85
|
+
* @param onResize - If the method was called on window resize.
|
|
86
|
+
*/
|
|
87
|
+
_responseProp(onResize = false) {
|
|
88
|
+
const responsiveProp = this._responsiveRules;
|
|
89
|
+
// get sizes
|
|
90
|
+
const app = this._app;
|
|
91
|
+
const { viewport } = app;
|
|
92
|
+
const { width } = viewport;
|
|
93
|
+
let newProp = false;
|
|
94
|
+
const statProp = mergeWithoutArrays({}, this._refProp);
|
|
95
|
+
// go through all breakpoints
|
|
96
|
+
// and check if a proper breakpoint exists
|
|
97
|
+
responsiveProp.forEach((prop) => {
|
|
98
|
+
// copy settings
|
|
99
|
+
const { settings, breakpoint } = prop;
|
|
100
|
+
// if the breakpoint is a number
|
|
101
|
+
if (typeof breakpoint === 'number') {
|
|
102
|
+
if (width <= prop.breakpoint) {
|
|
103
|
+
newProp = mergeWithoutArrays(statProp, settings);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (typeof breakpoint === 'string') {
|
|
107
|
+
const string = breakpoint.toLowerCase();
|
|
108
|
+
// viewport size
|
|
109
|
+
if ((string === 'd' && viewport.isDesktop)
|
|
110
|
+
|| (string === 't' && viewport.isTablet)
|
|
111
|
+
|| (string === 'p' && viewport.isPhone)) {
|
|
112
|
+
newProp = mergeWithoutArrays(statProp, settings);
|
|
113
|
+
}
|
|
114
|
+
// device type
|
|
115
|
+
if ((string === 'phone' && app.isPhone)
|
|
116
|
+
|| (string === 'tablet' && app.isTablet)
|
|
117
|
+
|| (string === 'mobile' && app.isMobile)) {
|
|
118
|
+
newProp = mergeWithoutArrays(statProp, settings);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
// if there's no breakpoint, restore the props
|
|
123
|
+
if (!newProp) {
|
|
124
|
+
this._prop = mergeWithoutArrays(this._prop, this._refProp);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
// otherwise, change the properties
|
|
128
|
+
this._prop = mergeWithoutArrays(this._prop, newProp);
|
|
129
|
+
}
|
|
130
|
+
// responsive callback
|
|
131
|
+
if (onResize) {
|
|
132
|
+
this._onResponsive();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* This method allows you to change the properties manually.
|
|
137
|
+
*/
|
|
138
|
+
changeProp(prop) {
|
|
139
|
+
this._prop = mergeWithoutArrays(this._prop, prop);
|
|
140
|
+
this._refProp = mergeWithoutArrays(this._refProp, prop);
|
|
141
|
+
// change prop callback
|
|
142
|
+
this._onChange(prop);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Destroy the responsive properties.
|
|
146
|
+
*/
|
|
147
|
+
destroy() {
|
|
148
|
+
if (this._viewportCallback) {
|
|
149
|
+
this._viewportCallback.remove();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Module } from './Module';
|
|
2
|
+
/**
|
|
3
|
+
* A class for Plugins.
|
|
4
|
+
*/
|
|
5
|
+
export class Plugin extends Module {
|
|
6
|
+
constructor(initialProp) {
|
|
7
|
+
super(initialProp, false);
|
|
8
|
+
}
|
|
9
|
+
get component() {
|
|
10
|
+
return this._component;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Initializes the class
|
|
14
|
+
*/
|
|
15
|
+
init() {
|
|
16
|
+
if (!this._component) {
|
|
17
|
+
throw new Error('Component is not set. Be sure that initlugin is called before.');
|
|
18
|
+
}
|
|
19
|
+
super.init();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Initialize the plugin
|
|
23
|
+
*/
|
|
24
|
+
initPlugin(parent) {
|
|
25
|
+
if (this._inited) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this._component = parent;
|
|
29
|
+
this.init();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Component } from '../../base/Component';
|
|
2
|
+
import { boundVal } from '../../utils/math';
|
|
3
|
+
/**
|
|
4
|
+
* Launch an animation frame with a certain FPS
|
|
5
|
+
*/
|
|
6
|
+
export class AnimationFrame extends Component {
|
|
7
|
+
constructor(initialProp, init = true) {
|
|
8
|
+
super(initialProp, false);
|
|
9
|
+
this._isPlaying = false;
|
|
10
|
+
this._frame = null;
|
|
11
|
+
this._frameIndex = -1;
|
|
12
|
+
this._timeStamp = null;
|
|
13
|
+
this._prevFrameTime = null;
|
|
14
|
+
if (init) {
|
|
15
|
+
this.init();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
get isPlaying() {
|
|
19
|
+
return this._isPlaying;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get default properties
|
|
23
|
+
*/
|
|
24
|
+
_getDefaultProp() {
|
|
25
|
+
return Object.assign(Object.assign({}, super._getDefaultProp()), { fps: 140, run: false });
|
|
26
|
+
}
|
|
27
|
+
// Extra constructor
|
|
28
|
+
_constructor() {
|
|
29
|
+
super._constructor();
|
|
30
|
+
this._create();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create the frame
|
|
34
|
+
*/
|
|
35
|
+
_create() {
|
|
36
|
+
if (this.prop.run) {
|
|
37
|
+
this.play();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_onPropMutate() {
|
|
41
|
+
this._frameIndex = -1;
|
|
42
|
+
this._timeStamp = null;
|
|
43
|
+
this._prevFrameTime = null;
|
|
44
|
+
if (this.prop.run) {
|
|
45
|
+
this._play();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this._pause();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Launch the animation frame.
|
|
53
|
+
*/
|
|
54
|
+
play() {
|
|
55
|
+
if (this.destroyed) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (this.prop.run) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.changeProp({
|
|
62
|
+
run: true,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Launch the animation frame.
|
|
67
|
+
*/
|
|
68
|
+
_play() {
|
|
69
|
+
// check if already playing
|
|
70
|
+
if (this.isPlaying) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this._isPlaying = true;
|
|
74
|
+
// launch animation
|
|
75
|
+
this._frame = window.requestAnimationFrame(this._animate.bind(this));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Stop the animation frame
|
|
79
|
+
*/
|
|
80
|
+
pause() {
|
|
81
|
+
if (!this.prop.run) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.changeProp({
|
|
85
|
+
run: false,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Stop the animation frame
|
|
90
|
+
*/
|
|
91
|
+
_pause() {
|
|
92
|
+
if (!this.isPlaying) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// cancel animation frame
|
|
96
|
+
if (this._frame) {
|
|
97
|
+
window.cancelAnimationFrame(this._frame);
|
|
98
|
+
this._frame = null;
|
|
99
|
+
}
|
|
100
|
+
// bool
|
|
101
|
+
this._isPlaying = false;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Launch the animation frame.
|
|
105
|
+
*/
|
|
106
|
+
_animate(timestamp) {
|
|
107
|
+
if (!this._isPlaying) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// launch animation
|
|
111
|
+
this._frame = window.requestAnimationFrame(this._animate.bind(this));
|
|
112
|
+
// update variables
|
|
113
|
+
const currentTime = +new Date();
|
|
114
|
+
if (this._timeStamp == null) {
|
|
115
|
+
this._timeStamp = timestamp;
|
|
116
|
+
}
|
|
117
|
+
if (this._prevFrameTime == null) {
|
|
118
|
+
this._prevFrameTime = currentTime;
|
|
119
|
+
}
|
|
120
|
+
// calculate frame index
|
|
121
|
+
const newFrameIndex = Math.floor((timestamp - this._timeStamp) / (1000 / this.prop.fps));
|
|
122
|
+
if (newFrameIndex <= this._frameIndex) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
// update frame index
|
|
126
|
+
this._frameIndex = newFrameIndex;
|
|
127
|
+
// calculate real fps
|
|
128
|
+
const timeDiff = currentTime - this._prevFrameTime;
|
|
129
|
+
const realFPS = boundVal(timeDiff === 0 ? 1000 / 60 : Math.floor(1000 / timeDiff), [1, Infinity]);
|
|
130
|
+
// launch callbacks
|
|
131
|
+
this.callbacks.tbt('frame', {
|
|
132
|
+
fps: this.prop.fps,
|
|
133
|
+
realFPS,
|
|
134
|
+
prevFrameDuration: currentTime - this._prevFrameTime,
|
|
135
|
+
});
|
|
136
|
+
this._prevFrameTime = +new Date();
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Destroy the animation frame
|
|
140
|
+
*/
|
|
141
|
+
_destroy() {
|
|
142
|
+
this.pause();
|
|
143
|
+
super._destroy();
|
|
144
|
+
}
|
|
145
|
+
}
|