@egjs/flicking 4.11.3-beta.4 → 4.12.0-beta.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/declaration/Flicking.d.ts +244 -240
- package/declaration/camera/Camera.d.ts +89 -89
- package/declaration/camera/index.d.ts +4 -4
- package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
- package/declaration/camera/mode/CameraMode.d.ts +20 -20
- package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
- package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
- package/declaration/camera/mode/index.d.ts +6 -6
- package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
- package/declaration/cfc/getRenderingPanels.d.ts +4 -4
- package/declaration/cfc/index.d.ts +5 -5
- package/declaration/cfc/sync.d.ts +4 -4
- package/declaration/cfc/withFlickingMethods.d.ts +2 -2
- package/declaration/const/axes.d.ts +8 -8
- package/declaration/const/error.d.ts +34 -34
- package/declaration/const/external.d.ts +48 -48
- package/declaration/control/AxesController.d.ts +44 -44
- package/declaration/control/Control.d.ts +45 -45
- package/declaration/control/FreeControl.d.ts +14 -14
- package/declaration/control/SnapControl.d.ts +16 -16
- package/declaration/control/StateMachine.d.ts +14 -14
- package/declaration/control/StrictControl.d.ts +20 -20
- package/declaration/control/index.d.ts +14 -14
- package/declaration/control/states/AnimatingState.d.ts +9 -9
- package/declaration/control/states/DisabledState.d.ts +9 -9
- package/declaration/control/states/DraggingState.d.ts +8 -8
- package/declaration/control/states/HoldingState.d.ts +10 -10
- package/declaration/control/states/IdleState.d.ts +9 -9
- package/declaration/control/states/State.d.ts +47 -47
- package/declaration/core/AnchorPoint.d.ts +15 -15
- package/declaration/core/AutoResizer.d.ts +16 -16
- package/declaration/core/FlickingError.d.ts +5 -5
- package/declaration/core/ResizeWatcher.d.ts +33 -33
- package/declaration/core/Viewport.d.ts +25 -25
- package/declaration/core/VirtualManager.d.ts +37 -37
- package/declaration/core/index.d.ts +6 -6
- package/declaration/core/panel/Panel.d.ts +89 -89
- package/declaration/core/panel/VirtualPanel.d.ts +19 -19
- package/declaration/core/panel/index.d.ts +5 -5
- package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
- package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
- package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
- package/declaration/core/panel/provider/index.d.ts +5 -5
- package/declaration/index.cjs.d.ts +3 -3
- package/declaration/index.d.ts +13 -13
- package/declaration/index.umd.d.ts +2 -2
- package/declaration/renderer/ExternalRenderer.d.ts +7 -7
- package/declaration/renderer/Renderer.d.ts +59 -59
- package/declaration/renderer/VanillaRenderer.d.ts +10 -10
- package/declaration/renderer/index.d.ts +6 -6
- package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
- package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
- package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
- package/declaration/renderer/strategy/index.d.ts +5 -5
- package/declaration/type/event.d.ts +88 -88
- package/declaration/type/external.d.ts +31 -31
- package/declaration/type/internal.d.ts +13 -13
- package/declaration/utils.d.ts +45 -45
- package/dist/flicking.cjs.js +70 -42
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +70 -42
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +70 -42
- 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 +70 -42
- 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 +24 -2
- package/src/control/AxesController.ts +1 -1
package/package.json
CHANGED
package/src/Flicking.ts
CHANGED
|
@@ -73,6 +73,7 @@ export interface FlickingOptions {
|
|
|
73
73
|
inputType: string[];
|
|
74
74
|
moveType: ValueOf<typeof MOVE_TYPE> | MoveTypeOptions<ValueOf<typeof MOVE_TYPE>>;
|
|
75
75
|
threshold: number;
|
|
76
|
+
dragThreshold: number;
|
|
76
77
|
interruptable: boolean;
|
|
77
78
|
bounce: number | string | [number | string, number | string];
|
|
78
79
|
iOSEdgeSwipeThreshold: number;
|
|
@@ -152,6 +153,7 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
152
153
|
private _inputType: FlickingOptions["inputType"];
|
|
153
154
|
private _moveType: FlickingOptions["moveType"];
|
|
154
155
|
private _threshold: FlickingOptions["threshold"];
|
|
156
|
+
private _dragThreshold: FlickingOptions["dragThreshold"];
|
|
155
157
|
private _interruptable: FlickingOptions["interruptable"];
|
|
156
158
|
private _bounce: FlickingOptions["bounce"];
|
|
157
159
|
private _iOSEdgeSwipeThreshold: FlickingOptions["iOSEdgeSwipeThreshold"];
|
|
@@ -350,7 +352,7 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
350
352
|
public get align() { return this._align; }
|
|
351
353
|
/**
|
|
352
354
|
* Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer
|
|
353
|
-
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는
|
|
355
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다.
|
|
354
356
|
* @type {number}
|
|
355
357
|
* @default 0
|
|
356
358
|
* @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
|
|
@@ -528,12 +530,20 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
528
530
|
public get moveType() { return this._moveType; }
|
|
529
531
|
/**
|
|
530
532
|
* Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.
|
|
531
|
-
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이
|
|
533
|
+
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능합니다.
|
|
532
534
|
* @type {number}
|
|
533
535
|
* @default 40
|
|
534
536
|
* @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
|
|
535
537
|
*/
|
|
536
538
|
public get threshold() { return this._threshold; }
|
|
539
|
+
/**
|
|
540
|
+
* Minimal distance of user input before recognizing (unit: px). It should be dragged above the dragThreshold to move the panel.
|
|
541
|
+
* @ko 사용자의 입력을 인식하기 위한 최소한의 거리 (단위: px). 주어진 값 이상으로 스크롤해야만 패널이 움직입니다.
|
|
542
|
+
* @type {number}
|
|
543
|
+
* @default 1
|
|
544
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#dragThreshold dragThreshold ( Options )}
|
|
545
|
+
*/
|
|
546
|
+
public get dragThreshold() { return this._dragThreshold; }
|
|
537
547
|
/**
|
|
538
548
|
* Set animation to be interruptable by click/touch.
|
|
539
549
|
* @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.
|
|
@@ -845,6 +855,16 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
845
855
|
}
|
|
846
856
|
|
|
847
857
|
public set threshold(val: FlickingOptions["threshold"]) { this._threshold = val; }
|
|
858
|
+
|
|
859
|
+
public set dragThreshold(val: FlickingOptions["dragThreshold"]) {
|
|
860
|
+
this._dragThreshold = val;
|
|
861
|
+
const panInput = this._control.controller.panInput;
|
|
862
|
+
|
|
863
|
+
if (panInput) {
|
|
864
|
+
panInput.options.threshold = val;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
848
868
|
public set interruptable(val: FlickingOptions["interruptable"]) {
|
|
849
869
|
this._interruptable = val;
|
|
850
870
|
|
|
@@ -969,6 +989,7 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
969
989
|
inputType = ["mouse", "touch"],
|
|
970
990
|
moveType = "snap",
|
|
971
991
|
threshold = 40,
|
|
992
|
+
dragThreshold = 1,
|
|
972
993
|
interruptable = true,
|
|
973
994
|
bounce = "20%",
|
|
974
995
|
iOSEdgeSwipeThreshold = 30,
|
|
@@ -1014,6 +1035,7 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
1014
1035
|
this._inputType = inputType;
|
|
1015
1036
|
this._moveType = moveType;
|
|
1016
1037
|
this._threshold = threshold;
|
|
1038
|
+
this._dragThreshold = dragThreshold;
|
|
1017
1039
|
this._interruptable = interruptable;
|
|
1018
1040
|
this._bounce = bounce;
|
|
1019
1041
|
this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
|
|
@@ -148,7 +148,7 @@ class AxesController {
|
|
|
148
148
|
});
|
|
149
149
|
this._panInput = new PanInput(flicking.viewport.element, {
|
|
150
150
|
inputType: flicking.inputType,
|
|
151
|
-
threshold:
|
|
151
|
+
threshold: flicking.dragThreshold,
|
|
152
152
|
iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
|
|
153
153
|
preventDefaultOnDrag: flicking.preventDefaultOnDrag,
|
|
154
154
|
scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
|