@egjs/flicking 4.10.0 → 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 +106 -13
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +106 -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 +106 -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 +24 -4
- package/src/control/Control.ts +9 -0
- package/src/core/panel/Panel.ts +5 -1
package/dist/flicking.pkgd.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() :
|
|
@@ -6456,10 +6456,10 @@ version: 4.10.0
|
|
|
6456
6456
|
var __proto = AxesController.prototype;
|
|
6457
6457
|
Object.defineProperty(__proto, "axes", {
|
|
6458
6458
|
/**
|
|
6459
|
-
* An {@link https://naver.github.io/egjs-axes/
|
|
6460
|
-
* @ko {@link https://naver.github.io/egjs-axes/
|
|
6461
|
-
* @type {Axes}
|
|
6462
|
-
* @see https://naver.github.io/egjs-axes/
|
|
6459
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance
|
|
6460
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스
|
|
6461
|
+
* @type {Axes | null}
|
|
6462
|
+
* @see https://naver.github.io/egjs-axes/docs/api/Axes
|
|
6463
6463
|
* @readonly
|
|
6464
6464
|
*/
|
|
6465
6465
|
get: function () {
|
|
@@ -6468,6 +6468,20 @@ version: 4.10.0
|
|
|
6468
6468
|
enumerable: false,
|
|
6469
6469
|
configurable: true
|
|
6470
6470
|
});
|
|
6471
|
+
Object.defineProperty(__proto, "panInput", {
|
|
6472
|
+
/**
|
|
6473
|
+
* An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance
|
|
6474
|
+
* @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스
|
|
6475
|
+
* @type {PanInput | null}
|
|
6476
|
+
* @see https://naver.github.io/egjs-axes/docs/api/PanInput
|
|
6477
|
+
* @readonly
|
|
6478
|
+
*/
|
|
6479
|
+
get: function () {
|
|
6480
|
+
return this._panInput;
|
|
6481
|
+
},
|
|
6482
|
+
enumerable: false,
|
|
6483
|
+
configurable: true
|
|
6484
|
+
});
|
|
6471
6485
|
Object.defineProperty(__proto, "stateMachine", {
|
|
6472
6486
|
/**
|
|
6473
6487
|
* @internal
|
|
@@ -6625,6 +6639,7 @@ version: 4.10.0
|
|
|
6625
6639
|
});
|
|
6626
6640
|
this._panInput = new PanInput(flicking.viewport.element, {
|
|
6627
6641
|
inputType: flicking.inputType,
|
|
6642
|
+
threshold: 1,
|
|
6628
6643
|
iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
|
|
6629
6644
|
scale: flicking.horizontal ? [-1, 0] : [0, -1],
|
|
6630
6645
|
releaseOnScroll: true
|
|
@@ -6906,6 +6921,15 @@ version: 4.10.0
|
|
|
6906
6921
|
}
|
|
6907
6922
|
};
|
|
6908
6923
|
|
|
6924
|
+
__proto.updateDirection = function () {
|
|
6925
|
+
var flicking = getFlickingAttached(this._flicking);
|
|
6926
|
+
var axes = this._axes;
|
|
6927
|
+
var panInput = this._panInput;
|
|
6928
|
+
axes.disconnect(panInput);
|
|
6929
|
+
axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput);
|
|
6930
|
+
panInput.options.scale = flicking.horizontal ? [-1, 0] : [0, -1];
|
|
6931
|
+
};
|
|
6932
|
+
|
|
6909
6933
|
__proto._resetInternalValues = function () {
|
|
6910
6934
|
this._flicking = null;
|
|
6911
6935
|
this._axes = null;
|
|
@@ -7252,6 +7276,16 @@ version: 4.10.0
|
|
|
7252
7276
|
}));
|
|
7253
7277
|
}
|
|
7254
7278
|
};
|
|
7279
|
+
/**
|
|
7280
|
+
* @internal
|
|
7281
|
+
*/
|
|
7282
|
+
|
|
7283
|
+
|
|
7284
|
+
__proto.copy = function (control) {
|
|
7285
|
+
this._flicking = control._flicking;
|
|
7286
|
+
this._activePanel = control._activePanel;
|
|
7287
|
+
this._controller = control._controller;
|
|
7288
|
+
};
|
|
7255
7289
|
|
|
7256
7290
|
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
7257
7291
|
var _a;
|
|
@@ -9099,13 +9133,9 @@ version: 4.10.0
|
|
|
9099
9133
|
this._updateMode();
|
|
9100
9134
|
|
|
9101
9135
|
this._range = this._mode.getRange();
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
return panel.updateCircularToggleDirection();
|
|
9106
|
-
});
|
|
9107
|
-
}
|
|
9108
|
-
|
|
9136
|
+
panels.forEach(function (panel) {
|
|
9137
|
+
return panel.updateCircularToggleDirection();
|
|
9138
|
+
});
|
|
9109
9139
|
return this;
|
|
9110
9140
|
};
|
|
9111
9141
|
/**
|
|
@@ -9342,6 +9372,7 @@ version: 4.10.0
|
|
|
9342
9372
|
this._circularEnabled = canSetCircularMode;
|
|
9343
9373
|
} else {
|
|
9344
9374
|
this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking);
|
|
9375
|
+
this._circularEnabled = false;
|
|
9345
9376
|
}
|
|
9346
9377
|
};
|
|
9347
9378
|
|
|
@@ -11400,6 +11431,8 @@ version: 4.10.0
|
|
|
11400
11431
|
// Options Setter
|
|
11401
11432
|
set: function (val) {
|
|
11402
11433
|
this._align = val;
|
|
11434
|
+
|
|
11435
|
+
this._updateAlignPos();
|
|
11403
11436
|
},
|
|
11404
11437
|
enumerable: false,
|
|
11405
11438
|
configurable: true
|
|
@@ -11694,6 +11727,7 @@ version: 4.10.0
|
|
|
11694
11727
|
|
|
11695
11728
|
if (!flicking.circularEnabled) {
|
|
11696
11729
|
this._toggleDirection = DIRECTION.NONE;
|
|
11730
|
+
this._togglePosition = 0;
|
|
11697
11731
|
this._toggled = false;
|
|
11698
11732
|
return this;
|
|
11699
11733
|
}
|
|
@@ -12527,6 +12561,7 @@ version: 4.10.0
|
|
|
12527
12561
|
this._align = val;
|
|
12528
12562
|
this._renderer.align = val;
|
|
12529
12563
|
this._camera.align = val;
|
|
12564
|
+
void this.resize();
|
|
12530
12565
|
},
|
|
12531
12566
|
enumerable: false,
|
|
12532
12567
|
configurable: true
|
|
@@ -12559,6 +12594,10 @@ version: 4.10.0
|
|
|
12559
12594
|
},
|
|
12560
12595
|
set: function (val) {
|
|
12561
12596
|
this._horizontal = val;
|
|
12597
|
+
|
|
12598
|
+
this._control.controller.updateDirection();
|
|
12599
|
+
|
|
12600
|
+
void this.resize();
|
|
12562
12601
|
},
|
|
12563
12602
|
enumerable: false,
|
|
12564
12603
|
configurable: true
|
|
@@ -12575,6 +12614,7 @@ version: 4.10.0
|
|
|
12575
12614
|
},
|
|
12576
12615
|
set: function (val) {
|
|
12577
12616
|
this._circular = val;
|
|
12617
|
+
void this.resize();
|
|
12578
12618
|
},
|
|
12579
12619
|
enumerable: false,
|
|
12580
12620
|
configurable: true
|
|
@@ -12611,6 +12651,7 @@ version: 4.10.0
|
|
|
12611
12651
|
},
|
|
12612
12652
|
set: function (val) {
|
|
12613
12653
|
this._bound = val;
|
|
12654
|
+
void this.resize();
|
|
12614
12655
|
},
|
|
12615
12656
|
enumerable: false,
|
|
12616
12657
|
configurable: true
|
|
@@ -12627,6 +12668,7 @@ version: 4.10.0
|
|
|
12627
12668
|
},
|
|
12628
12669
|
set: function (val) {
|
|
12629
12670
|
this._adaptive = val;
|
|
12671
|
+
void this.resize();
|
|
12630
12672
|
},
|
|
12631
12673
|
enumerable: false,
|
|
12632
12674
|
configurable: true
|
|
@@ -12643,6 +12685,7 @@ version: 4.10.0
|
|
|
12643
12685
|
},
|
|
12644
12686
|
set: function (val) {
|
|
12645
12687
|
this._panelsPerView = val;
|
|
12688
|
+
void this.resize();
|
|
12646
12689
|
},
|
|
12647
12690
|
enumerable: false,
|
|
12648
12691
|
configurable: true
|
|
@@ -12661,6 +12704,7 @@ version: 4.10.0
|
|
|
12661
12704
|
},
|
|
12662
12705
|
set: function (val) {
|
|
12663
12706
|
this._noPanelStyleOverride = val;
|
|
12707
|
+
void this.resize();
|
|
12664
12708
|
},
|
|
12665
12709
|
enumerable: false,
|
|
12666
12710
|
configurable: true
|
|
@@ -12679,6 +12723,10 @@ version: 4.10.0
|
|
|
12679
12723
|
},
|
|
12680
12724
|
set: function (val) {
|
|
12681
12725
|
this._resizeOnContentsReady = val;
|
|
12726
|
+
|
|
12727
|
+
if (val) {
|
|
12728
|
+
this._renderer.checkPanelContentsReady(this._renderer.panels);
|
|
12729
|
+
}
|
|
12682
12730
|
},
|
|
12683
12731
|
enumerable: false,
|
|
12684
12732
|
configurable: true
|
|
@@ -12697,6 +12745,11 @@ version: 4.10.0
|
|
|
12697
12745
|
},
|
|
12698
12746
|
set: function (val) {
|
|
12699
12747
|
this._nested = val;
|
|
12748
|
+
var axes = this._control.controller.axes;
|
|
12749
|
+
|
|
12750
|
+
if (axes) {
|
|
12751
|
+
axes.options.nested = val;
|
|
12752
|
+
}
|
|
12700
12753
|
},
|
|
12701
12754
|
enumerable: false,
|
|
12702
12755
|
configurable: true
|
|
@@ -12751,6 +12804,11 @@ version: 4.10.0
|
|
|
12751
12804
|
// ANIMATION
|
|
12752
12805
|
set: function (val) {
|
|
12753
12806
|
this._deceleration = val;
|
|
12807
|
+
var axes = this._control.controller.axes;
|
|
12808
|
+
|
|
12809
|
+
if (axes) {
|
|
12810
|
+
axes.options.deceleration = val;
|
|
12811
|
+
}
|
|
12754
12812
|
},
|
|
12755
12813
|
enumerable: false,
|
|
12756
12814
|
configurable: true
|
|
@@ -12768,6 +12826,11 @@ version: 4.10.0
|
|
|
12768
12826
|
},
|
|
12769
12827
|
set: function (val) {
|
|
12770
12828
|
this._easing = val;
|
|
12829
|
+
var axes = this._control.controller.axes;
|
|
12830
|
+
|
|
12831
|
+
if (axes) {
|
|
12832
|
+
axes.options.easing = val;
|
|
12833
|
+
}
|
|
12771
12834
|
},
|
|
12772
12835
|
enumerable: false,
|
|
12773
12836
|
configurable: true
|
|
@@ -12805,6 +12868,11 @@ version: 4.10.0
|
|
|
12805
12868
|
// INPUT
|
|
12806
12869
|
set: function (val) {
|
|
12807
12870
|
this._inputType = val;
|
|
12871
|
+
var panInput = this._control.controller.panInput;
|
|
12872
|
+
|
|
12873
|
+
if (panInput) {
|
|
12874
|
+
panInput.options.inputType = val;
|
|
12875
|
+
}
|
|
12808
12876
|
},
|
|
12809
12877
|
enumerable: false,
|
|
12810
12878
|
configurable: true
|
|
@@ -12845,6 +12913,18 @@ version: 4.10.0
|
|
|
12845
12913
|
},
|
|
12846
12914
|
set: function (val) {
|
|
12847
12915
|
this._moveType = val;
|
|
12916
|
+
var prevControl = this._control;
|
|
12917
|
+
|
|
12918
|
+
var newControl = this._createControl();
|
|
12919
|
+
|
|
12920
|
+
var activePanel = prevControl.activePanel;
|
|
12921
|
+
newControl.copy(prevControl);
|
|
12922
|
+
var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0;
|
|
12923
|
+
this._control = newControl;
|
|
12924
|
+
|
|
12925
|
+
this._control.updatePosition(prevProgressInPanel);
|
|
12926
|
+
|
|
12927
|
+
this._control.updateInput();
|
|
12848
12928
|
},
|
|
12849
12929
|
enumerable: false,
|
|
12850
12930
|
configurable: true
|
|
@@ -12877,6 +12957,11 @@ version: 4.10.0
|
|
|
12877
12957
|
},
|
|
12878
12958
|
set: function (val) {
|
|
12879
12959
|
this._interruptable = val;
|
|
12960
|
+
var axes = this._control.controller.axes;
|
|
12961
|
+
|
|
12962
|
+
if (axes) {
|
|
12963
|
+
axes.options.interruptable = val;
|
|
12964
|
+
}
|
|
12880
12965
|
},
|
|
12881
12966
|
enumerable: false,
|
|
12882
12967
|
configurable: true
|
|
@@ -12918,6 +13003,8 @@ version: 4.10.0
|
|
|
12918
13003
|
},
|
|
12919
13004
|
set: function (val) {
|
|
12920
13005
|
this._bounce = val;
|
|
13006
|
+
|
|
13007
|
+
this._control.updateInput();
|
|
12921
13008
|
},
|
|
12922
13009
|
enumerable: false,
|
|
12923
13010
|
configurable: true
|
|
@@ -12934,6 +13021,11 @@ version: 4.10.0
|
|
|
12934
13021
|
},
|
|
12935
13022
|
set: function (val) {
|
|
12936
13023
|
this._iOSEdgeSwipeThreshold = val;
|
|
13024
|
+
var panInput = this._control.controller.panInput;
|
|
13025
|
+
|
|
13026
|
+
if (panInput) {
|
|
13027
|
+
panInput.options.iOSEdgeSwipeThreshold = val;
|
|
13028
|
+
}
|
|
12937
13029
|
},
|
|
12938
13030
|
enumerable: false,
|
|
12939
13031
|
configurable: true
|
|
@@ -13013,6 +13105,7 @@ version: 4.10.0
|
|
|
13013
13105
|
// PERFORMANCE
|
|
13014
13106
|
set: function (val) {
|
|
13015
13107
|
this._renderOnlyVisible = val;
|
|
13108
|
+
void this._renderer.render();
|
|
13016
13109
|
},
|
|
13017
13110
|
enumerable: false,
|
|
13018
13111
|
configurable: true
|
|
@@ -14022,7 +14115,7 @@ version: 4.10.0
|
|
|
14022
14115
|
*/
|
|
14023
14116
|
|
|
14024
14117
|
|
|
14025
|
-
Flicking.VERSION = "4.10.
|
|
14118
|
+
Flicking.VERSION = "4.10.2";
|
|
14026
14119
|
return Flicking;
|
|
14027
14120
|
}(Component);
|
|
14028
14121
|
|