@egjs/flicking 4.10.1 → 4.10.2
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/declaration/control/AxesController.d.ts +3 -1
- package/declaration/control/Control.d.ts +1 -0
- package/dist/flicking.esm.js +105 -13
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +105 -13
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +105 -13
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/Flicking.ts +121 -16
- package/src/camera/Camera.ts +2 -3
- package/src/control/AxesController.ts +23 -4
- package/src/control/Control.ts +9 -0
- package/src/core/panel/Panel.ts +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Axes, { OnRelease } from "@egjs/axes";
|
|
1
|
+
import Axes, { PanInput, OnRelease } from "@egjs/axes";
|
|
2
2
|
import Flicking from "../Flicking";
|
|
3
3
|
import { ControlParams } from "../type/external";
|
|
4
4
|
import StateMachine from "./StateMachine";
|
|
@@ -10,6 +10,7 @@ declare class AxesController {
|
|
|
10
10
|
private _animatingContext;
|
|
11
11
|
private _dragged;
|
|
12
12
|
get axes(): Axes;
|
|
13
|
+
get panInput(): PanInput;
|
|
13
14
|
get stateMachine(): StateMachine;
|
|
14
15
|
get state(): import("./states/State").default;
|
|
15
16
|
get animatingContext(): {
|
|
@@ -34,6 +35,7 @@ declare class AxesController {
|
|
|
34
35
|
addPreventClickHandler(): this;
|
|
35
36
|
removePreventClickHandler(): this;
|
|
36
37
|
animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
38
|
+
updateDirection(): void;
|
|
37
39
|
private _resetInternalValues;
|
|
38
40
|
private _onAxesHold;
|
|
39
41
|
private _onAxesChange;
|
|
@@ -31,6 +31,7 @@ declare abstract class Control {
|
|
|
31
31
|
axesEvent?: OnRelease;
|
|
32
32
|
}): Promise<void>;
|
|
33
33
|
setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean): void;
|
|
34
|
+
copy(control: Control): void;
|
|
34
35
|
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease): void;
|
|
35
36
|
protected _animateToPosition({ position, duration, newActivePanel, axesEvent }: {
|
|
36
37
|
position: number;
|
package/dist/flicking.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.10.
|
|
7
|
+
version: 4.10.2
|
|
8
8
|
*/
|
|
9
9
|
import Component, { ComponentEvent } from '@egjs/component';
|
|
10
10
|
import Axes, { PanInput } from '@egjs/axes';
|
|
@@ -2206,10 +2206,10 @@ function () {
|
|
|
2206
2206
|
var __proto = AxesController.prototype;
|
|
2207
2207
|
Object.defineProperty(__proto, "axes", {
|
|
2208
2208
|
/**
|
|
2209
|
-
* An {@link https://naver.github.io/egjs-axes/
|
|
2210
|
-
* @ko {@link https://naver.github.io/egjs-axes/
|
|
2211
|
-
* @type {Axes}
|
|
2212
|
-
* @see https://naver.github.io/egjs-axes/
|
|
2209
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance
|
|
2210
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스
|
|
2211
|
+
* @type {Axes | null}
|
|
2212
|
+
* @see https://naver.github.io/egjs-axes/docs/api/Axes
|
|
2213
2213
|
* @readonly
|
|
2214
2214
|
*/
|
|
2215
2215
|
get: function () {
|
|
@@ -2218,6 +2218,20 @@ function () {
|
|
|
2218
2218
|
enumerable: false,
|
|
2219
2219
|
configurable: true
|
|
2220
2220
|
});
|
|
2221
|
+
Object.defineProperty(__proto, "panInput", {
|
|
2222
|
+
/**
|
|
2223
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance
|
|
2224
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스
|
|
2225
|
+
* @type {PanInput | null}
|
|
2226
|
+
* @see https://naver.github.io/egjs-axes/docs/api/PanInput
|
|
2227
|
+
* @readonly
|
|
2228
|
+
*/
|
|
2229
|
+
get: function () {
|
|
2230
|
+
return this._panInput;
|
|
2231
|
+
},
|
|
2232
|
+
enumerable: false,
|
|
2233
|
+
configurable: true
|
|
2234
|
+
});
|
|
2221
2235
|
Object.defineProperty(__proto, "stateMachine", {
|
|
2222
2236
|
/**
|
|
2223
2237
|
* @internal
|
|
@@ -2657,6 +2671,15 @@ function () {
|
|
|
2657
2671
|
}
|
|
2658
2672
|
};
|
|
2659
2673
|
|
|
2674
|
+
__proto.updateDirection = function () {
|
|
2675
|
+
var flicking = getFlickingAttached(this._flicking);
|
|
2676
|
+
var axes = this._axes;
|
|
2677
|
+
var panInput = this._panInput;
|
|
2678
|
+
axes.disconnect(panInput);
|
|
2679
|
+
axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput);
|
|
2680
|
+
panInput.options.scale = flicking.horizontal ? [-1, 0] : [0, -1];
|
|
2681
|
+
};
|
|
2682
|
+
|
|
2660
2683
|
__proto._resetInternalValues = function () {
|
|
2661
2684
|
this._flicking = null;
|
|
2662
2685
|
this._axes = null;
|
|
@@ -3003,6 +3026,16 @@ function () {
|
|
|
3003
3026
|
}));
|
|
3004
3027
|
}
|
|
3005
3028
|
};
|
|
3029
|
+
/**
|
|
3030
|
+
* @internal
|
|
3031
|
+
*/
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
__proto.copy = function (control) {
|
|
3035
|
+
this._flicking = control._flicking;
|
|
3036
|
+
this._activePanel = control._activePanel;
|
|
3037
|
+
this._controller = control._controller;
|
|
3038
|
+
};
|
|
3006
3039
|
|
|
3007
3040
|
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
3008
3041
|
var _a;
|
|
@@ -4829,13 +4862,9 @@ function () {
|
|
|
4829
4862
|
this._updateMode();
|
|
4830
4863
|
|
|
4831
4864
|
this._range = this._mode.getRange();
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
return panel.updateCircularToggleDirection();
|
|
4836
|
-
});
|
|
4837
|
-
}
|
|
4838
|
-
|
|
4865
|
+
panels.forEach(function (panel) {
|
|
4866
|
+
return panel.updateCircularToggleDirection();
|
|
4867
|
+
});
|
|
4839
4868
|
return this;
|
|
4840
4869
|
};
|
|
4841
4870
|
/**
|
|
@@ -5072,6 +5101,7 @@ function () {
|
|
|
5072
5101
|
this._circularEnabled = canSetCircularMode;
|
|
5073
5102
|
} else {
|
|
5074
5103
|
this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking);
|
|
5104
|
+
this._circularEnabled = false;
|
|
5075
5105
|
}
|
|
5076
5106
|
};
|
|
5077
5107
|
|
|
@@ -6100,6 +6130,8 @@ function () {
|
|
|
6100
6130
|
// Options Setter
|
|
6101
6131
|
set: function (val) {
|
|
6102
6132
|
this._align = val;
|
|
6133
|
+
|
|
6134
|
+
this._updateAlignPos();
|
|
6103
6135
|
},
|
|
6104
6136
|
enumerable: false,
|
|
6105
6137
|
configurable: true
|
|
@@ -6394,6 +6426,7 @@ function () {
|
|
|
6394
6426
|
|
|
6395
6427
|
if (!flicking.circularEnabled) {
|
|
6396
6428
|
this._toggleDirection = DIRECTION.NONE;
|
|
6429
|
+
this._togglePosition = 0;
|
|
6397
6430
|
this._toggled = false;
|
|
6398
6431
|
return this;
|
|
6399
6432
|
}
|
|
@@ -7213,6 +7246,7 @@ function (_super) {
|
|
|
7213
7246
|
this._align = val;
|
|
7214
7247
|
this._renderer.align = val;
|
|
7215
7248
|
this._camera.align = val;
|
|
7249
|
+
void this.resize();
|
|
7216
7250
|
},
|
|
7217
7251
|
enumerable: false,
|
|
7218
7252
|
configurable: true
|
|
@@ -7245,6 +7279,10 @@ function (_super) {
|
|
|
7245
7279
|
},
|
|
7246
7280
|
set: function (val) {
|
|
7247
7281
|
this._horizontal = val;
|
|
7282
|
+
|
|
7283
|
+
this._control.controller.updateDirection();
|
|
7284
|
+
|
|
7285
|
+
void this.resize();
|
|
7248
7286
|
},
|
|
7249
7287
|
enumerable: false,
|
|
7250
7288
|
configurable: true
|
|
@@ -7261,6 +7299,7 @@ function (_super) {
|
|
|
7261
7299
|
},
|
|
7262
7300
|
set: function (val) {
|
|
7263
7301
|
this._circular = val;
|
|
7302
|
+
void this.resize();
|
|
7264
7303
|
},
|
|
7265
7304
|
enumerable: false,
|
|
7266
7305
|
configurable: true
|
|
@@ -7297,6 +7336,7 @@ function (_super) {
|
|
|
7297
7336
|
},
|
|
7298
7337
|
set: function (val) {
|
|
7299
7338
|
this._bound = val;
|
|
7339
|
+
void this.resize();
|
|
7300
7340
|
},
|
|
7301
7341
|
enumerable: false,
|
|
7302
7342
|
configurable: true
|
|
@@ -7313,6 +7353,7 @@ function (_super) {
|
|
|
7313
7353
|
},
|
|
7314
7354
|
set: function (val) {
|
|
7315
7355
|
this._adaptive = val;
|
|
7356
|
+
void this.resize();
|
|
7316
7357
|
},
|
|
7317
7358
|
enumerable: false,
|
|
7318
7359
|
configurable: true
|
|
@@ -7329,6 +7370,7 @@ function (_super) {
|
|
|
7329
7370
|
},
|
|
7330
7371
|
set: function (val) {
|
|
7331
7372
|
this._panelsPerView = val;
|
|
7373
|
+
void this.resize();
|
|
7332
7374
|
},
|
|
7333
7375
|
enumerable: false,
|
|
7334
7376
|
configurable: true
|
|
@@ -7347,6 +7389,7 @@ function (_super) {
|
|
|
7347
7389
|
},
|
|
7348
7390
|
set: function (val) {
|
|
7349
7391
|
this._noPanelStyleOverride = val;
|
|
7392
|
+
void this.resize();
|
|
7350
7393
|
},
|
|
7351
7394
|
enumerable: false,
|
|
7352
7395
|
configurable: true
|
|
@@ -7365,6 +7408,10 @@ function (_super) {
|
|
|
7365
7408
|
},
|
|
7366
7409
|
set: function (val) {
|
|
7367
7410
|
this._resizeOnContentsReady = val;
|
|
7411
|
+
|
|
7412
|
+
if (val) {
|
|
7413
|
+
this._renderer.checkPanelContentsReady(this._renderer.panels);
|
|
7414
|
+
}
|
|
7368
7415
|
},
|
|
7369
7416
|
enumerable: false,
|
|
7370
7417
|
configurable: true
|
|
@@ -7383,6 +7430,11 @@ function (_super) {
|
|
|
7383
7430
|
},
|
|
7384
7431
|
set: function (val) {
|
|
7385
7432
|
this._nested = val;
|
|
7433
|
+
var axes = this._control.controller.axes;
|
|
7434
|
+
|
|
7435
|
+
if (axes) {
|
|
7436
|
+
axes.options.nested = val;
|
|
7437
|
+
}
|
|
7386
7438
|
},
|
|
7387
7439
|
enumerable: false,
|
|
7388
7440
|
configurable: true
|
|
@@ -7437,6 +7489,11 @@ function (_super) {
|
|
|
7437
7489
|
// ANIMATION
|
|
7438
7490
|
set: function (val) {
|
|
7439
7491
|
this._deceleration = val;
|
|
7492
|
+
var axes = this._control.controller.axes;
|
|
7493
|
+
|
|
7494
|
+
if (axes) {
|
|
7495
|
+
axes.options.deceleration = val;
|
|
7496
|
+
}
|
|
7440
7497
|
},
|
|
7441
7498
|
enumerable: false,
|
|
7442
7499
|
configurable: true
|
|
@@ -7454,6 +7511,11 @@ function (_super) {
|
|
|
7454
7511
|
},
|
|
7455
7512
|
set: function (val) {
|
|
7456
7513
|
this._easing = val;
|
|
7514
|
+
var axes = this._control.controller.axes;
|
|
7515
|
+
|
|
7516
|
+
if (axes) {
|
|
7517
|
+
axes.options.easing = val;
|
|
7518
|
+
}
|
|
7457
7519
|
},
|
|
7458
7520
|
enumerable: false,
|
|
7459
7521
|
configurable: true
|
|
@@ -7491,6 +7553,11 @@ function (_super) {
|
|
|
7491
7553
|
// INPUT
|
|
7492
7554
|
set: function (val) {
|
|
7493
7555
|
this._inputType = val;
|
|
7556
|
+
var panInput = this._control.controller.panInput;
|
|
7557
|
+
|
|
7558
|
+
if (panInput) {
|
|
7559
|
+
panInput.options.inputType = val;
|
|
7560
|
+
}
|
|
7494
7561
|
},
|
|
7495
7562
|
enumerable: false,
|
|
7496
7563
|
configurable: true
|
|
@@ -7531,6 +7598,18 @@ function (_super) {
|
|
|
7531
7598
|
},
|
|
7532
7599
|
set: function (val) {
|
|
7533
7600
|
this._moveType = val;
|
|
7601
|
+
var prevControl = this._control;
|
|
7602
|
+
|
|
7603
|
+
var newControl = this._createControl();
|
|
7604
|
+
|
|
7605
|
+
var activePanel = prevControl.activePanel;
|
|
7606
|
+
newControl.copy(prevControl);
|
|
7607
|
+
var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0;
|
|
7608
|
+
this._control = newControl;
|
|
7609
|
+
|
|
7610
|
+
this._control.updatePosition(prevProgressInPanel);
|
|
7611
|
+
|
|
7612
|
+
this._control.updateInput();
|
|
7534
7613
|
},
|
|
7535
7614
|
enumerable: false,
|
|
7536
7615
|
configurable: true
|
|
@@ -7563,6 +7642,11 @@ function (_super) {
|
|
|
7563
7642
|
},
|
|
7564
7643
|
set: function (val) {
|
|
7565
7644
|
this._interruptable = val;
|
|
7645
|
+
var axes = this._control.controller.axes;
|
|
7646
|
+
|
|
7647
|
+
if (axes) {
|
|
7648
|
+
axes.options.interruptable = val;
|
|
7649
|
+
}
|
|
7566
7650
|
},
|
|
7567
7651
|
enumerable: false,
|
|
7568
7652
|
configurable: true
|
|
@@ -7604,6 +7688,8 @@ function (_super) {
|
|
|
7604
7688
|
},
|
|
7605
7689
|
set: function (val) {
|
|
7606
7690
|
this._bounce = val;
|
|
7691
|
+
|
|
7692
|
+
this._control.updateInput();
|
|
7607
7693
|
},
|
|
7608
7694
|
enumerable: false,
|
|
7609
7695
|
configurable: true
|
|
@@ -7620,6 +7706,11 @@ function (_super) {
|
|
|
7620
7706
|
},
|
|
7621
7707
|
set: function (val) {
|
|
7622
7708
|
this._iOSEdgeSwipeThreshold = val;
|
|
7709
|
+
var panInput = this._control.controller.panInput;
|
|
7710
|
+
|
|
7711
|
+
if (panInput) {
|
|
7712
|
+
panInput.options.iOSEdgeSwipeThreshold = val;
|
|
7713
|
+
}
|
|
7623
7714
|
},
|
|
7624
7715
|
enumerable: false,
|
|
7625
7716
|
configurable: true
|
|
@@ -7699,6 +7790,7 @@ function (_super) {
|
|
|
7699
7790
|
// PERFORMANCE
|
|
7700
7791
|
set: function (val) {
|
|
7701
7792
|
this._renderOnlyVisible = val;
|
|
7793
|
+
void this._renderer.render();
|
|
7702
7794
|
},
|
|
7703
7795
|
enumerable: false,
|
|
7704
7796
|
configurable: true
|
|
@@ -8708,7 +8800,7 @@ function (_super) {
|
|
|
8708
8800
|
*/
|
|
8709
8801
|
|
|
8710
8802
|
|
|
8711
|
-
Flicking.VERSION = "4.10.
|
|
8803
|
+
Flicking.VERSION = "4.10.2";
|
|
8712
8804
|
return Flicking;
|
|
8713
8805
|
}(Component);
|
|
8714
8806
|
|