@egjs/flicking-plugins 4.3.0 → 4.5.0
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/css/arrow.css +12 -0
- package/declaration/AutoPlay.d.ts +10 -1
- package/dist/arrow.css +12 -0
- package/dist/arrow.min.css +1 -1
- package/dist/flicking-plugins.css +12 -0
- package/dist/flicking-plugins.min.css +1 -1
- package/dist/plugins.esm.js +65 -32
- package/dist/plugins.esm.js.map +1 -1
- package/dist/plugins.js +65 -32
- package/dist/plugins.js.map +1 -1
- package/dist/plugins.min.js +2 -2
- package/dist/plugins.min.js.map +1 -1
- package/package.json +1 -1
- package/src/AutoPlay.ts +28 -10
package/css/arrow.css
CHANGED
|
@@ -86,3 +86,15 @@
|
|
|
86
86
|
.flicking-arrow-disabled::after {
|
|
87
87
|
background-color: #e6e6e6;
|
|
88
88
|
}
|
|
89
|
+
|
|
90
|
+
.flicking-arrow-prev.is-thin::before,
|
|
91
|
+
.flicking-arrow-prev.is-thin::after,
|
|
92
|
+
.flicking-arrow-next.is-thin::before,
|
|
93
|
+
.flicking-arrow-next.is-thin::after{
|
|
94
|
+
height: 3px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.flicking-arrow-prev.is-thin::after,
|
|
98
|
+
.flicking-arrow-next.is-thin::after{
|
|
99
|
+
top: calc(50% - 2px);
|
|
100
|
+
}
|
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import Flicking, { Plugin, DIRECTION } from "@egjs/flicking";
|
|
2
2
|
interface AutoPlayOptions {
|
|
3
3
|
duration: number;
|
|
4
|
+
animationDuration: number | undefined;
|
|
4
5
|
direction: typeof DIRECTION["NEXT"] | typeof DIRECTION["PREV"];
|
|
5
6
|
stopOnHover: boolean;
|
|
7
|
+
delayAfterHover: number;
|
|
6
8
|
}
|
|
7
9
|
declare class AutoPlay implements Plugin {
|
|
8
10
|
private _duration;
|
|
11
|
+
private _animationDuration;
|
|
9
12
|
private _direction;
|
|
10
13
|
private _stopOnHover;
|
|
14
|
+
private _delayAfterHover;
|
|
11
15
|
private _flicking;
|
|
12
16
|
private _timerId;
|
|
13
17
|
private _mouseEntered;
|
|
14
18
|
get duration(): number;
|
|
19
|
+
get animationDuration(): number | undefined;
|
|
15
20
|
get direction(): AutoPlayOptions["direction"];
|
|
16
21
|
get stopOnHover(): boolean;
|
|
22
|
+
get delayAfterHover(): number;
|
|
17
23
|
set duration(val: number);
|
|
24
|
+
set animationDuration(val: number | undefined);
|
|
18
25
|
set direction(val: AutoPlayOptions["direction"]);
|
|
19
26
|
set stopOnHover(val: boolean);
|
|
20
|
-
|
|
27
|
+
set delayAfterHover(val: number);
|
|
28
|
+
constructor({ duration, animationDuration, direction, stopOnHover, delayAfterHover }?: Partial<AutoPlayOptions>);
|
|
21
29
|
init(flicking: Flicking): void;
|
|
22
30
|
destroy(): void;
|
|
23
31
|
update(): void;
|
|
24
32
|
play: () => void;
|
|
25
33
|
stop: () => void;
|
|
34
|
+
private _movePanel;
|
|
26
35
|
private _onMouseEnter;
|
|
27
36
|
private _onMouseLeave;
|
|
28
37
|
}
|
package/dist/arrow.css
CHANGED
|
@@ -104,3 +104,15 @@
|
|
|
104
104
|
.flicking-arrow-disabled::after {
|
|
105
105
|
background-color: #e6e6e6;
|
|
106
106
|
}
|
|
107
|
+
|
|
108
|
+
.flicking-arrow-prev.is-thin::before,
|
|
109
|
+
.flicking-arrow-prev.is-thin::after,
|
|
110
|
+
.flicking-arrow-next.is-thin::before,
|
|
111
|
+
.flicking-arrow-next.is-thin::after{
|
|
112
|
+
height: 3px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.flicking-arrow-prev.is-thin::after,
|
|
116
|
+
.flicking-arrow-next.is-thin::after{
|
|
117
|
+
top: calc(50% - 2px);
|
|
118
|
+
}
|
package/dist/arrow.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flicking-arrow-next,.flicking-arrow-prev{position:absolute;top:50%;width:64px;height:64px;cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.flicking-arrow-next.is-circle,.flicking-arrow-prev.is-circle{background-color:#f2a65e;border-radius:50%}.flicking-arrow-disabled.is-circle{background-color:rgb(10 10 10 / 10%)}.flicking-arrow-next.is-circle::after,.flicking-arrow-next.is-circle::before,.flicking-arrow-prev.is-circle::after,.flicking-arrow-prev.is-circle::before{background-color:#fff}.flicking-arrow-prev{left:10px}.flicking-arrow-next{right:10px}.flicking-arrow-prev.is-outside{left:-74px}.flicking-arrow-next.is-outside{right:-74px}.flicking-arrow-next::after,.flicking-arrow-next::before,.flicking-arrow-prev::after,.flicking-arrow-prev::before{content:"";width:24px;height:6px;position:absolute;background-color:#f2a65e}.flicking-arrow-prev::before{top:50%;left:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-prev::after{top:calc(50% - 4px);left:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-next::before{top:50%;right:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-next::after{top:calc(50% - 4px);right:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-disabled{cursor:default}.flicking-arrow-disabled::after,.flicking-arrow-disabled::before{background-color:#e6e6e6}
|
|
1
|
+
.flicking-arrow-next,.flicking-arrow-prev{position:absolute;top:50%;width:64px;height:64px;cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.flicking-arrow-next.is-circle,.flicking-arrow-prev.is-circle{background-color:#f2a65e;border-radius:50%}.flicking-arrow-disabled.is-circle{background-color:rgb(10 10 10 / 10%)}.flicking-arrow-next.is-circle::after,.flicking-arrow-next.is-circle::before,.flicking-arrow-prev.is-circle::after,.flicking-arrow-prev.is-circle::before{background-color:#fff}.flicking-arrow-prev{left:10px}.flicking-arrow-next{right:10px}.flicking-arrow-prev.is-outside{left:-74px}.flicking-arrow-next.is-outside{right:-74px}.flicking-arrow-next::after,.flicking-arrow-next::before,.flicking-arrow-prev::after,.flicking-arrow-prev::before{content:"";width:24px;height:6px;position:absolute;background-color:#f2a65e}.flicking-arrow-prev::before{top:50%;left:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-prev::after{top:calc(50% - 4px);left:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-next::before{top:50%;right:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-next::after{top:calc(50% - 4px);right:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-disabled{cursor:default}.flicking-arrow-disabled::after,.flicking-arrow-disabled::before{background-color:#e6e6e6}.flicking-arrow-next.is-thin::after,.flicking-arrow-next.is-thin::before,.flicking-arrow-prev.is-thin::after,.flicking-arrow-prev.is-thin::before{height:3px}.flicking-arrow-next.is-thin::after,.flicking-arrow-prev.is-thin::after{top:calc(50% - 2px)}
|
|
@@ -104,6 +104,18 @@
|
|
|
104
104
|
.flicking-arrow-disabled::after {
|
|
105
105
|
background-color: #e6e6e6;
|
|
106
106
|
}
|
|
107
|
+
|
|
108
|
+
.flicking-arrow-prev.is-thin::before,
|
|
109
|
+
.flicking-arrow-prev.is-thin::after,
|
|
110
|
+
.flicking-arrow-next.is-thin::before,
|
|
111
|
+
.flicking-arrow-next.is-thin::after{
|
|
112
|
+
height: 3px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.flicking-arrow-prev.is-thin::after,
|
|
116
|
+
.flicking-arrow-next.is-thin::after{
|
|
117
|
+
top: calc(50% - 2px);
|
|
118
|
+
}
|
|
107
119
|
.flicking-pagination {
|
|
108
120
|
position: absolute;
|
|
109
121
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.flicking-arrow-next,.flicking-arrow-prev{position:absolute;top:50%;width:64px;height:64px;cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.flicking-arrow-next.is-circle,.flicking-arrow-prev.is-circle{background-color:#f2a65e;border-radius:50%}.flicking-arrow-disabled.is-circle{background-color:rgb(10 10 10 / 10%)}.flicking-arrow-next.is-circle::after,.flicking-arrow-next.is-circle::before,.flicking-arrow-prev.is-circle::after,.flicking-arrow-prev.is-circle::before{background-color:#fff}.flicking-arrow-prev{left:10px}.flicking-arrow-next{right:10px}.flicking-arrow-prev.is-outside{left:-74px}.flicking-arrow-next.is-outside{right:-74px}.flicking-arrow-next::after,.flicking-arrow-next::before,.flicking-arrow-prev::after,.flicking-arrow-prev::before{content:"";width:24px;height:6px;position:absolute;background-color:#f2a65e}.flicking-arrow-prev::before{top:50%;left:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-prev::after{top:calc(50% - 4px);left:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-next::before{top:50%;right:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-next::after{top:calc(50% - 4px);right:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-disabled{cursor:default}.flicking-arrow-disabled::after,.flicking-arrow-disabled::before{background-color:#e6e6e6}.flicking-pagination{position:absolute;left:0;bottom:10px;width:100%;text-align:center;z-index:2}.flicking-pagination-bullets,.flicking-pagination-scroll{font-size:0}.flicking-pagination-scroll{left:50%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);white-space:nowrap;overflow:hidden}.flicking-pagination-scroll .flicking-pagination-slider{-webkit-transition:.2s transform;transition:.2s transform}.flicking-pagination-scroll.flicking-pagination-uninitialized .flicking-pagination-bullet,.flicking-pagination-scroll.flicking-pagination-uninitialized .flicking-pagination-slider{-webkit-transition:none;transition:none}.flicking-pagination-bullet{display:inline-block;width:8px;height:8px;margin:0 4px;border-radius:50%;background-color:rgb(10 10 10 / 10%);cursor:pointer;font-size:1rem}.flicking-pagination-scroll .flicking-pagination-bullet{vertical-align:middle;position:relative;-webkit-transition:.2s transform;transition:.2s transform}.flicking-pagination-bullet-active{background-color:#f2a65e}.flicking-pagination-scroll .flicking-pagination-bullet{vertical-align:middle;position:relative;-webkit-transition:.2s transform,.2s left;transition:.2s transform,.2s left;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.flicking-pagination-scroll .flicking-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.flicking-pagination-scroll .flicking-pagination-bullet-next,.flicking-pagination-scroll .flicking-pagination-bullet-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.flicking-pagination-scroll .flicking-pagination-bullet-next2,.flicking-pagination-scroll .flicking-pagination-bullet-prev2{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}
|
|
1
|
+
.flicking-arrow-next,.flicking-arrow-prev{position:absolute;top:50%;width:64px;height:64px;cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2}.flicking-arrow-next.is-circle,.flicking-arrow-prev.is-circle{background-color:#f2a65e;border-radius:50%}.flicking-arrow-disabled.is-circle{background-color:rgb(10 10 10 / 10%)}.flicking-arrow-next.is-circle::after,.flicking-arrow-next.is-circle::before,.flicking-arrow-prev.is-circle::after,.flicking-arrow-prev.is-circle::before{background-color:#fff}.flicking-arrow-prev{left:10px}.flicking-arrow-next{right:10px}.flicking-arrow-prev.is-outside{left:-74px}.flicking-arrow-next.is-outside{right:-74px}.flicking-arrow-next::after,.flicking-arrow-next::before,.flicking-arrow-prev::after,.flicking-arrow-prev::before{content:"";width:24px;height:6px;position:absolute;background-color:#f2a65e}.flicking-arrow-prev::before{top:50%;left:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-prev::after{top:calc(50% - 4px);left:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:0 50%;-ms-transform-origin:0 50%;transform-origin:0 50%}.flicking-arrow-next::before{top:50%;right:22px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-next::after{top:calc(50% - 4px);right:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.flicking-arrow-disabled{cursor:default}.flicking-arrow-disabled::after,.flicking-arrow-disabled::before{background-color:#e6e6e6}.flicking-arrow-next.is-thin::after,.flicking-arrow-next.is-thin::before,.flicking-arrow-prev.is-thin::after,.flicking-arrow-prev.is-thin::before{height:3px}.flicking-arrow-next.is-thin::after,.flicking-arrow-prev.is-thin::after{top:calc(50% - 2px)}.flicking-pagination{position:absolute;left:0;bottom:10px;width:100%;text-align:center;z-index:2}.flicking-pagination-bullets,.flicking-pagination-scroll{font-size:0}.flicking-pagination-scroll{left:50%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);white-space:nowrap;overflow:hidden}.flicking-pagination-scroll .flicking-pagination-slider{-webkit-transition:.2s transform;transition:.2s transform}.flicking-pagination-scroll.flicking-pagination-uninitialized .flicking-pagination-bullet,.flicking-pagination-scroll.flicking-pagination-uninitialized .flicking-pagination-slider{-webkit-transition:none;transition:none}.flicking-pagination-bullet{display:inline-block;width:8px;height:8px;margin:0 4px;border-radius:50%;background-color:rgb(10 10 10 / 10%);cursor:pointer;font-size:1rem}.flicking-pagination-scroll .flicking-pagination-bullet{vertical-align:middle;position:relative;-webkit-transition:.2s transform;transition:.2s transform}.flicking-pagination-bullet-active{background-color:#f2a65e}.flicking-pagination-scroll .flicking-pagination-bullet{vertical-align:middle;position:relative;-webkit-transition:.2s transform,.2s left;transition:.2s transform,.2s left;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.flicking-pagination-scroll .flicking-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.flicking-pagination-scroll .flicking-pagination-bullet-next,.flicking-pagination-scroll .flicking-pagination-bullet-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.flicking-pagination-scroll .flicking-pagination-bullet-next2,.flicking-pagination-scroll .flicking-pagination-bullet-prev2{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}
|
package/dist/plugins.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/flicking-plugins
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking-plugins
|
|
7
|
-
version: 4.
|
|
7
|
+
version: 4.5.0
|
|
8
8
|
*/
|
|
9
9
|
import { EVENTS, DIRECTION, FlickingError, clamp } from '@egjs/flicking';
|
|
10
10
|
|
|
@@ -221,8 +221,10 @@ function () {
|
|
|
221
221
|
/**
|
|
222
222
|
* @param {AutoPlayOptions} options Options for the AutoPlay instance.<ko>AutoPlay 옵션</ko>
|
|
223
223
|
* @param {number} options.duration Time to wait before moving on to the next panel.<ko>다음 패널로 움직이기까지 대기 시간</ko>
|
|
224
|
+
* @param {number | undefined} options.animationDuration Duration of animation of moving to the next panel. If undefined, duration option of the Flicking instance is used instead.<ko>패널이 움직이는 애니메이션의 지속 시간, undefined라면 Flicking 인스턴스의 duration 값을 사용한다</ko>
|
|
224
225
|
* @param {"PREV" | "NEXT"} options.direction The direction in which the panel moves.<ko>패널이 움직이는 방향</ko>
|
|
225
226
|
* @param {boolean} options.stopOnHover Whether to stop when mouse hover upon the element.<ko>엘리먼트에 마우스를 올렸을 때 AutoPlay를 정지할지 여부</ko>
|
|
227
|
+
* @param {number} options.delayAfterHover If stopOnHover is true, the amount of time to wait before moving on to the next panel when mouse leaves the element.<ko>stopOnHover를 사용한다면 마우스가 엘리먼트로부터 나간 뒤 다음 패널로 움직이기까지 대기 시간</ko>
|
|
226
228
|
* @example
|
|
227
229
|
* ```ts
|
|
228
230
|
* flicking.addPlugins(new AutoPlay({ duration: 2000, direction: "NEXT" }));
|
|
@@ -234,10 +236,13 @@ function () {
|
|
|
234
236
|
var _b = _a === void 0 ? {} : _a,
|
|
235
237
|
_c = _b.duration,
|
|
236
238
|
duration = _c === void 0 ? 2000 : _c,
|
|
237
|
-
_d = _b.
|
|
238
|
-
|
|
239
|
-
_e = _b.
|
|
240
|
-
|
|
239
|
+
_d = _b.animationDuration,
|
|
240
|
+
animationDuration = _d === void 0 ? undefined : _d,
|
|
241
|
+
_e = _b.direction,
|
|
242
|
+
direction = _e === void 0 ? DIRECTION.NEXT : _e,
|
|
243
|
+
_f = _b.stopOnHover,
|
|
244
|
+
stopOnHover = _f === void 0 ? false : _f,
|
|
245
|
+
delayAfterHover = _b.delayAfterHover;
|
|
241
246
|
/* Internal Values */
|
|
242
247
|
|
|
243
248
|
|
|
@@ -246,32 +251,7 @@ function () {
|
|
|
246
251
|
this._mouseEntered = false;
|
|
247
252
|
|
|
248
253
|
this.play = function () {
|
|
249
|
-
|
|
250
|
-
var direction = _this._direction;
|
|
251
|
-
|
|
252
|
-
if (!flicking) {
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
_this.stop();
|
|
257
|
-
|
|
258
|
-
if (_this._mouseEntered || flicking.animating) {
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
_this._timerId = window.setTimeout(function () {
|
|
263
|
-
if (direction === DIRECTION.NEXT) {
|
|
264
|
-
flicking.next().catch(function () {
|
|
265
|
-
return void 0;
|
|
266
|
-
});
|
|
267
|
-
} else {
|
|
268
|
-
flicking.prev().catch(function () {
|
|
269
|
-
return void 0;
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
_this.play();
|
|
274
|
-
}, _this._duration);
|
|
254
|
+
_this._movePanel(_this._duration);
|
|
275
255
|
};
|
|
276
256
|
|
|
277
257
|
this.stop = function () {
|
|
@@ -287,12 +267,14 @@ function () {
|
|
|
287
267
|
this._onMouseLeave = function () {
|
|
288
268
|
_this._mouseEntered = false;
|
|
289
269
|
|
|
290
|
-
_this.
|
|
270
|
+
_this._movePanel(_this._delayAfterHover);
|
|
291
271
|
};
|
|
292
272
|
|
|
293
273
|
this._duration = duration;
|
|
274
|
+
this._animationDuration = animationDuration;
|
|
294
275
|
this._direction = direction;
|
|
295
276
|
this._stopOnHover = stopOnHover;
|
|
277
|
+
this._delayAfterHover = delayAfterHover !== null && delayAfterHover !== void 0 ? delayAfterHover : duration;
|
|
296
278
|
}
|
|
297
279
|
|
|
298
280
|
var __proto = AutoPlay.prototype;
|
|
@@ -306,6 +288,16 @@ function () {
|
|
|
306
288
|
enumerable: false,
|
|
307
289
|
configurable: true
|
|
308
290
|
});
|
|
291
|
+
Object.defineProperty(__proto, "animationDuration", {
|
|
292
|
+
get: function () {
|
|
293
|
+
return this._animationDuration;
|
|
294
|
+
},
|
|
295
|
+
set: function (val) {
|
|
296
|
+
this._animationDuration = val;
|
|
297
|
+
},
|
|
298
|
+
enumerable: false,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
309
301
|
Object.defineProperty(__proto, "direction", {
|
|
310
302
|
get: function () {
|
|
311
303
|
return this._direction;
|
|
@@ -326,6 +318,16 @@ function () {
|
|
|
326
318
|
enumerable: false,
|
|
327
319
|
configurable: true
|
|
328
320
|
});
|
|
321
|
+
Object.defineProperty(__proto, "delayAfterHover", {
|
|
322
|
+
get: function () {
|
|
323
|
+
return this._delayAfterHover;
|
|
324
|
+
},
|
|
325
|
+
set: function (val) {
|
|
326
|
+
this._delayAfterHover = val;
|
|
327
|
+
},
|
|
328
|
+
enumerable: false,
|
|
329
|
+
configurable: true
|
|
330
|
+
});
|
|
329
331
|
|
|
330
332
|
__proto.init = function (flicking) {
|
|
331
333
|
var _a;
|
|
@@ -368,6 +370,37 @@ function () {
|
|
|
368
370
|
__proto.update = function () {// DO-NOTHING
|
|
369
371
|
};
|
|
370
372
|
|
|
373
|
+
__proto._movePanel = function (duration) {
|
|
374
|
+
var _this = this;
|
|
375
|
+
|
|
376
|
+
var flicking = this._flicking;
|
|
377
|
+
var direction = this._direction;
|
|
378
|
+
|
|
379
|
+
if (!flicking) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
this.stop();
|
|
384
|
+
|
|
385
|
+
if (this._mouseEntered || flicking.animating) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
this._timerId = window.setTimeout(function () {
|
|
390
|
+
if (direction === DIRECTION.NEXT) {
|
|
391
|
+
flicking.next(_this._animationDuration).catch(function () {
|
|
392
|
+
return void 0;
|
|
393
|
+
});
|
|
394
|
+
} else {
|
|
395
|
+
flicking.prev(_this._animationDuration).catch(function () {
|
|
396
|
+
return void 0;
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
_this.play();
|
|
401
|
+
}, duration);
|
|
402
|
+
};
|
|
403
|
+
|
|
371
404
|
return AutoPlay;
|
|
372
405
|
}();
|
|
373
406
|
|