@egjs/flicking 4.11.3-beta.2 → 4.11.3-beta.4
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 +240 -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 +22 -16
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +22 -16
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +22 -16
- 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 +22 -16
- 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 +6 -0
- package/src/camera/Camera.ts +4 -2
- package/src/control/SnapControl.ts +4 -4
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.11.3-beta.
|
|
7
|
+
version: 4.11.3-beta.4
|
|
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')) :
|
|
@@ -12,7 +12,7 @@ version: 4.11.3-beta.2
|
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory(global.eg.Component, global.eg.Axes, global.eg.ImReady));
|
|
13
13
|
})(this, (function (Component, Axes, ImReady) { 'use strict';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/*! *****************************************************************************
|
|
16
16
|
Copyright (c) Microsoft Corporation.
|
|
17
17
|
|
|
18
18
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -26,7 +26,7 @@ version: 4.11.3-beta.2
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
/* global Reflect, Promise
|
|
29
|
+
/* global Reflect, Promise */
|
|
30
30
|
|
|
31
31
|
var extendStatics = function (d, b) {
|
|
32
32
|
extendStatics = Object.setPrototypeOf || {
|
|
@@ -111,7 +111,7 @@ version: 4.11.3-beta.2
|
|
|
111
111
|
}
|
|
112
112
|
function step(op) {
|
|
113
113
|
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
-
while (
|
|
114
|
+
while (_) try {
|
|
115
115
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
116
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
117
117
|
switch (op[0]) {
|
|
@@ -215,10 +215,6 @@ version: 4.11.3-beta.2
|
|
|
215
215
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
216
216
|
return ar;
|
|
217
217
|
}
|
|
218
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
219
|
-
var e = new Error(message);
|
|
220
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
221
|
-
};
|
|
222
218
|
|
|
223
219
|
/*
|
|
224
220
|
* Copyright (c) 2015 NAVER Corp.
|
|
@@ -2913,7 +2909,7 @@ version: 4.11.3-beta.2
|
|
|
2913
2909
|
if (!activeAnchor || !anchorAtCamera) {
|
|
2914
2910
|
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
2915
2911
|
}
|
|
2916
|
-
var snapThreshold = this._calcSnapThreshold(position, activeAnchor);
|
|
2912
|
+
var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);
|
|
2917
2913
|
var posDelta = flicking.animating ? state.delta : position - camera.position;
|
|
2918
2914
|
var absPosDelta = Math.abs(posDelta);
|
|
2919
2915
|
var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta;
|
|
@@ -3000,7 +2996,7 @@ version: 4.11.3-beta.2
|
|
|
3000
2996
|
var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
|
|
3001
2997
|
return adjacentAnchor;
|
|
3002
2998
|
};
|
|
3003
|
-
__proto._calcSnapThreshold = function (position, activeAnchor) {
|
|
2999
|
+
__proto._calcSnapThreshold = function (threshold, position, activeAnchor) {
|
|
3004
3000
|
var isNextDirection = position > activeAnchor.position;
|
|
3005
3001
|
var panel = activeAnchor.panel;
|
|
3006
3002
|
var panelSize = panel.size;
|
|
@@ -3011,7 +3007,7 @@ version: 4.11.3-beta.2
|
|
|
3011
3007
|
* |<------>|<------------>|
|
|
3012
3008
|
* [ |<-Anchor ]
|
|
3013
3009
|
*/
|
|
3014
|
-
return isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev;
|
|
3010
|
+
return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev);
|
|
3015
3011
|
};
|
|
3016
3012
|
return SnapControl;
|
|
3017
3013
|
}(Control$1);
|
|
@@ -4237,11 +4233,13 @@ version: 4.11.3-beta.2
|
|
|
4237
4233
|
* @return {AnchorPoint | null}
|
|
4238
4234
|
*/
|
|
4239
4235
|
__proto.findActiveAnchor = function () {
|
|
4236
|
+
var _a;
|
|
4240
4237
|
var flicking = getFlickingAttached(this._flicking);
|
|
4241
|
-
var
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4238
|
+
var activePanel = flicking.control.activePanel;
|
|
4239
|
+
if (!activePanel) return null;
|
|
4240
|
+
return (_a = find(this._anchors, function (anchor) {
|
|
4241
|
+
return anchor.panel.index === activePanel.index;
|
|
4242
|
+
})) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
|
|
4245
4243
|
};
|
|
4246
4244
|
/**
|
|
4247
4245
|
* Clamp the given position between camera's range
|
|
@@ -7675,6 +7673,10 @@ version: 4.11.3-beta.2
|
|
|
7675
7673
|
return [4 /*yield*/, renderer.forceRenderAllPanels()];
|
|
7676
7674
|
case 1:
|
|
7677
7675
|
_a.sent(); // Render all panel elements, to update sizes
|
|
7676
|
+
if (!this._initialized) {
|
|
7677
|
+
return [2 /*return*/];
|
|
7678
|
+
}
|
|
7679
|
+
|
|
7678
7680
|
renderer.updatePanelSize();
|
|
7679
7681
|
camera.updateAlignPos();
|
|
7680
7682
|
camera.updateRange();
|
|
@@ -7685,6 +7687,10 @@ version: 4.11.3-beta.2
|
|
|
7685
7687
|
return [4 /*yield*/, renderer.render()];
|
|
7686
7688
|
case 2:
|
|
7687
7689
|
_a.sent();
|
|
7690
|
+
if (!this._initialized) {
|
|
7691
|
+
return [2 /*return*/];
|
|
7692
|
+
}
|
|
7693
|
+
|
|
7688
7694
|
if (control.animating) ; else {
|
|
7689
7695
|
control.updatePosition(prevProgressInPanel);
|
|
7690
7696
|
control.updateInput();
|
|
@@ -7921,7 +7927,7 @@ version: 4.11.3-beta.2
|
|
|
7921
7927
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7922
7928
|
* ```
|
|
7923
7929
|
*/
|
|
7924
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
7930
|
+
Flicking.VERSION = "4.11.3-beta.4";
|
|
7925
7931
|
return Flicking;
|
|
7926
7932
|
}(Component);
|
|
7927
7933
|
|