@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
package/dist/flicking.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
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
|
|
@@ -2252,10 +2252,10 @@ version: 4.10.1
|
|
|
2252
2252
|
var __proto = AxesController.prototype;
|
|
2253
2253
|
Object.defineProperty(__proto, "axes", {
|
|
2254
2254
|
/**
|
|
2255
|
-
* An {@link https://naver.github.io/egjs-axes/
|
|
2256
|
-
* @ko {@link https://naver.github.io/egjs-axes/
|
|
2257
|
-
* @type {Axes}
|
|
2258
|
-
* @see https://naver.github.io/egjs-axes/
|
|
2255
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance
|
|
2256
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스
|
|
2257
|
+
* @type {Axes | null}
|
|
2258
|
+
* @see https://naver.github.io/egjs-axes/docs/api/Axes
|
|
2259
2259
|
* @readonly
|
|
2260
2260
|
*/
|
|
2261
2261
|
get: function () {
|
|
@@ -2264,6 +2264,20 @@ version: 4.10.1
|
|
|
2264
2264
|
enumerable: false,
|
|
2265
2265
|
configurable: true
|
|
2266
2266
|
});
|
|
2267
|
+
Object.defineProperty(__proto, "panInput", {
|
|
2268
|
+
/**
|
|
2269
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance
|
|
2270
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스
|
|
2271
|
+
* @type {PanInput | null}
|
|
2272
|
+
* @see https://naver.github.io/egjs-axes/docs/api/PanInput
|
|
2273
|
+
* @readonly
|
|
2274
|
+
*/
|
|
2275
|
+
get: function () {
|
|
2276
|
+
return this._panInput;
|
|
2277
|
+
},
|
|
2278
|
+
enumerable: false,
|
|
2279
|
+
configurable: true
|
|
2280
|
+
});
|
|
2267
2281
|
Object.defineProperty(__proto, "stateMachine", {
|
|
2268
2282
|
/**
|
|
2269
2283
|
* @internal
|
|
@@ -2703,6 +2717,15 @@ version: 4.10.1
|
|
|
2703
2717
|
}
|
|
2704
2718
|
};
|
|
2705
2719
|
|
|
2720
|
+
__proto.updateDirection = function () {
|
|
2721
|
+
var flicking = getFlickingAttached(this._flicking);
|
|
2722
|
+
var axes = this._axes;
|
|
2723
|
+
var panInput = this._panInput;
|
|
2724
|
+
axes.disconnect(panInput);
|
|
2725
|
+
axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput);
|
|
2726
|
+
panInput.options.scale = flicking.horizontal ? [-1, 0] : [0, -1];
|
|
2727
|
+
};
|
|
2728
|
+
|
|
2706
2729
|
__proto._resetInternalValues = function () {
|
|
2707
2730
|
this._flicking = null;
|
|
2708
2731
|
this._axes = null;
|
|
@@ -3049,6 +3072,16 @@ version: 4.10.1
|
|
|
3049
3072
|
}));
|
|
3050
3073
|
}
|
|
3051
3074
|
};
|
|
3075
|
+
/**
|
|
3076
|
+
* @internal
|
|
3077
|
+
*/
|
|
3078
|
+
|
|
3079
|
+
|
|
3080
|
+
__proto.copy = function (control) {
|
|
3081
|
+
this._flicking = control._flicking;
|
|
3082
|
+
this._activePanel = control._activePanel;
|
|
3083
|
+
this._controller = control._controller;
|
|
3084
|
+
};
|
|
3052
3085
|
|
|
3053
3086
|
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
3054
3087
|
var _a;
|
|
@@ -4896,13 +4929,9 @@ version: 4.10.1
|
|
|
4896
4929
|
this._updateMode();
|
|
4897
4930
|
|
|
4898
4931
|
this._range = this._mode.getRange();
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
return panel.updateCircularToggleDirection();
|
|
4903
|
-
});
|
|
4904
|
-
}
|
|
4905
|
-
|
|
4932
|
+
panels.forEach(function (panel) {
|
|
4933
|
+
return panel.updateCircularToggleDirection();
|
|
4934
|
+
});
|
|
4906
4935
|
return this;
|
|
4907
4936
|
};
|
|
4908
4937
|
/**
|
|
@@ -5139,6 +5168,7 @@ version: 4.10.1
|
|
|
5139
5168
|
this._circularEnabled = canSetCircularMode;
|
|
5140
5169
|
} else {
|
|
5141
5170
|
this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking);
|
|
5171
|
+
this._circularEnabled = false;
|
|
5142
5172
|
}
|
|
5143
5173
|
};
|
|
5144
5174
|
|
|
@@ -6180,6 +6210,8 @@ version: 4.10.1
|
|
|
6180
6210
|
// Options Setter
|
|
6181
6211
|
set: function (val) {
|
|
6182
6212
|
this._align = val;
|
|
6213
|
+
|
|
6214
|
+
this._updateAlignPos();
|
|
6183
6215
|
},
|
|
6184
6216
|
enumerable: false,
|
|
6185
6217
|
configurable: true
|
|
@@ -6474,6 +6506,7 @@ version: 4.10.1
|
|
|
6474
6506
|
|
|
6475
6507
|
if (!flicking.circularEnabled) {
|
|
6476
6508
|
this._toggleDirection = DIRECTION.NONE;
|
|
6509
|
+
this._togglePosition = 0;
|
|
6477
6510
|
this._toggled = false;
|
|
6478
6511
|
return this;
|
|
6479
6512
|
}
|
|
@@ -7307,6 +7340,7 @@ version: 4.10.1
|
|
|
7307
7340
|
this._align = val;
|
|
7308
7341
|
this._renderer.align = val;
|
|
7309
7342
|
this._camera.align = val;
|
|
7343
|
+
void this.resize();
|
|
7310
7344
|
},
|
|
7311
7345
|
enumerable: false,
|
|
7312
7346
|
configurable: true
|
|
@@ -7339,6 +7373,10 @@ version: 4.10.1
|
|
|
7339
7373
|
},
|
|
7340
7374
|
set: function (val) {
|
|
7341
7375
|
this._horizontal = val;
|
|
7376
|
+
|
|
7377
|
+
this._control.controller.updateDirection();
|
|
7378
|
+
|
|
7379
|
+
void this.resize();
|
|
7342
7380
|
},
|
|
7343
7381
|
enumerable: false,
|
|
7344
7382
|
configurable: true
|
|
@@ -7355,6 +7393,7 @@ version: 4.10.1
|
|
|
7355
7393
|
},
|
|
7356
7394
|
set: function (val) {
|
|
7357
7395
|
this._circular = val;
|
|
7396
|
+
void this.resize();
|
|
7358
7397
|
},
|
|
7359
7398
|
enumerable: false,
|
|
7360
7399
|
configurable: true
|
|
@@ -7391,6 +7430,7 @@ version: 4.10.1
|
|
|
7391
7430
|
},
|
|
7392
7431
|
set: function (val) {
|
|
7393
7432
|
this._bound = val;
|
|
7433
|
+
void this.resize();
|
|
7394
7434
|
},
|
|
7395
7435
|
enumerable: false,
|
|
7396
7436
|
configurable: true
|
|
@@ -7407,6 +7447,7 @@ version: 4.10.1
|
|
|
7407
7447
|
},
|
|
7408
7448
|
set: function (val) {
|
|
7409
7449
|
this._adaptive = val;
|
|
7450
|
+
void this.resize();
|
|
7410
7451
|
},
|
|
7411
7452
|
enumerable: false,
|
|
7412
7453
|
configurable: true
|
|
@@ -7423,6 +7464,7 @@ version: 4.10.1
|
|
|
7423
7464
|
},
|
|
7424
7465
|
set: function (val) {
|
|
7425
7466
|
this._panelsPerView = val;
|
|
7467
|
+
void this.resize();
|
|
7426
7468
|
},
|
|
7427
7469
|
enumerable: false,
|
|
7428
7470
|
configurable: true
|
|
@@ -7441,6 +7483,7 @@ version: 4.10.1
|
|
|
7441
7483
|
},
|
|
7442
7484
|
set: function (val) {
|
|
7443
7485
|
this._noPanelStyleOverride = val;
|
|
7486
|
+
void this.resize();
|
|
7444
7487
|
},
|
|
7445
7488
|
enumerable: false,
|
|
7446
7489
|
configurable: true
|
|
@@ -7459,6 +7502,10 @@ version: 4.10.1
|
|
|
7459
7502
|
},
|
|
7460
7503
|
set: function (val) {
|
|
7461
7504
|
this._resizeOnContentsReady = val;
|
|
7505
|
+
|
|
7506
|
+
if (val) {
|
|
7507
|
+
this._renderer.checkPanelContentsReady(this._renderer.panels);
|
|
7508
|
+
}
|
|
7462
7509
|
},
|
|
7463
7510
|
enumerable: false,
|
|
7464
7511
|
configurable: true
|
|
@@ -7477,6 +7524,11 @@ version: 4.10.1
|
|
|
7477
7524
|
},
|
|
7478
7525
|
set: function (val) {
|
|
7479
7526
|
this._nested = val;
|
|
7527
|
+
var axes = this._control.controller.axes;
|
|
7528
|
+
|
|
7529
|
+
if (axes) {
|
|
7530
|
+
axes.options.nested = val;
|
|
7531
|
+
}
|
|
7480
7532
|
},
|
|
7481
7533
|
enumerable: false,
|
|
7482
7534
|
configurable: true
|
|
@@ -7531,6 +7583,11 @@ version: 4.10.1
|
|
|
7531
7583
|
// ANIMATION
|
|
7532
7584
|
set: function (val) {
|
|
7533
7585
|
this._deceleration = val;
|
|
7586
|
+
var axes = this._control.controller.axes;
|
|
7587
|
+
|
|
7588
|
+
if (axes) {
|
|
7589
|
+
axes.options.deceleration = val;
|
|
7590
|
+
}
|
|
7534
7591
|
},
|
|
7535
7592
|
enumerable: false,
|
|
7536
7593
|
configurable: true
|
|
@@ -7548,6 +7605,11 @@ version: 4.10.1
|
|
|
7548
7605
|
},
|
|
7549
7606
|
set: function (val) {
|
|
7550
7607
|
this._easing = val;
|
|
7608
|
+
var axes = this._control.controller.axes;
|
|
7609
|
+
|
|
7610
|
+
if (axes) {
|
|
7611
|
+
axes.options.easing = val;
|
|
7612
|
+
}
|
|
7551
7613
|
},
|
|
7552
7614
|
enumerable: false,
|
|
7553
7615
|
configurable: true
|
|
@@ -7585,6 +7647,11 @@ version: 4.10.1
|
|
|
7585
7647
|
// INPUT
|
|
7586
7648
|
set: function (val) {
|
|
7587
7649
|
this._inputType = val;
|
|
7650
|
+
var panInput = this._control.controller.panInput;
|
|
7651
|
+
|
|
7652
|
+
if (panInput) {
|
|
7653
|
+
panInput.options.inputType = val;
|
|
7654
|
+
}
|
|
7588
7655
|
},
|
|
7589
7656
|
enumerable: false,
|
|
7590
7657
|
configurable: true
|
|
@@ -7625,6 +7692,18 @@ version: 4.10.1
|
|
|
7625
7692
|
},
|
|
7626
7693
|
set: function (val) {
|
|
7627
7694
|
this._moveType = val;
|
|
7695
|
+
var prevControl = this._control;
|
|
7696
|
+
|
|
7697
|
+
var newControl = this._createControl();
|
|
7698
|
+
|
|
7699
|
+
var activePanel = prevControl.activePanel;
|
|
7700
|
+
newControl.copy(prevControl);
|
|
7701
|
+
var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0;
|
|
7702
|
+
this._control = newControl;
|
|
7703
|
+
|
|
7704
|
+
this._control.updatePosition(prevProgressInPanel);
|
|
7705
|
+
|
|
7706
|
+
this._control.updateInput();
|
|
7628
7707
|
},
|
|
7629
7708
|
enumerable: false,
|
|
7630
7709
|
configurable: true
|
|
@@ -7657,6 +7736,11 @@ version: 4.10.1
|
|
|
7657
7736
|
},
|
|
7658
7737
|
set: function (val) {
|
|
7659
7738
|
this._interruptable = val;
|
|
7739
|
+
var axes = this._control.controller.axes;
|
|
7740
|
+
|
|
7741
|
+
if (axes) {
|
|
7742
|
+
axes.options.interruptable = val;
|
|
7743
|
+
}
|
|
7660
7744
|
},
|
|
7661
7745
|
enumerable: false,
|
|
7662
7746
|
configurable: true
|
|
@@ -7698,6 +7782,8 @@ version: 4.10.1
|
|
|
7698
7782
|
},
|
|
7699
7783
|
set: function (val) {
|
|
7700
7784
|
this._bounce = val;
|
|
7785
|
+
|
|
7786
|
+
this._control.updateInput();
|
|
7701
7787
|
},
|
|
7702
7788
|
enumerable: false,
|
|
7703
7789
|
configurable: true
|
|
@@ -7714,6 +7800,11 @@ version: 4.10.1
|
|
|
7714
7800
|
},
|
|
7715
7801
|
set: function (val) {
|
|
7716
7802
|
this._iOSEdgeSwipeThreshold = val;
|
|
7803
|
+
var panInput = this._control.controller.panInput;
|
|
7804
|
+
|
|
7805
|
+
if (panInput) {
|
|
7806
|
+
panInput.options.iOSEdgeSwipeThreshold = val;
|
|
7807
|
+
}
|
|
7717
7808
|
},
|
|
7718
7809
|
enumerable: false,
|
|
7719
7810
|
configurable: true
|
|
@@ -7793,6 +7884,7 @@ version: 4.10.1
|
|
|
7793
7884
|
// PERFORMANCE
|
|
7794
7885
|
set: function (val) {
|
|
7795
7886
|
this._renderOnlyVisible = val;
|
|
7887
|
+
void this._renderer.render();
|
|
7796
7888
|
},
|
|
7797
7889
|
enumerable: false,
|
|
7798
7890
|
configurable: true
|
|
@@ -8802,7 +8894,7 @@ version: 4.10.1
|
|
|
8802
8894
|
*/
|
|
8803
8895
|
|
|
8804
8896
|
|
|
8805
|
-
Flicking.VERSION = "4.10.
|
|
8897
|
+
Flicking.VERSION = "4.10.2";
|
|
8806
8898
|
return Flicking;
|
|
8807
8899
|
}(Component);
|
|
8808
8900
|
|