@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.esm.js
CHANGED
|
@@ -4,13 +4,13 @@ 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
|
import Component, { ComponentEvent } from '@egjs/component';
|
|
10
10
|
import Axes, { PanInput } from '@egjs/axes';
|
|
11
11
|
import ImReady from '@egjs/imready';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/*! *****************************************************************************
|
|
14
14
|
Copyright (c) Microsoft Corporation.
|
|
15
15
|
|
|
16
16
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -24,7 +24,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
24
24
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
25
25
|
PERFORMANCE OF THIS SOFTWARE.
|
|
26
26
|
***************************************************************************** */
|
|
27
|
-
/* global Reflect, Promise
|
|
27
|
+
/* global Reflect, Promise */
|
|
28
28
|
|
|
29
29
|
var extendStatics = function (d, b) {
|
|
30
30
|
extendStatics = Object.setPrototypeOf || {
|
|
@@ -109,7 +109,7 @@ function __generator(thisArg, body) {
|
|
|
109
109
|
}
|
|
110
110
|
function step(op) {
|
|
111
111
|
if (f) throw new TypeError("Generator is already executing.");
|
|
112
|
-
while (
|
|
112
|
+
while (_) try {
|
|
113
113
|
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;
|
|
114
114
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
115
115
|
switch (op[0]) {
|
|
@@ -213,10 +213,6 @@ function __spread() {
|
|
|
213
213
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
214
214
|
return ar;
|
|
215
215
|
}
|
|
216
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
217
|
-
var e = new Error(message);
|
|
218
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
219
|
-
};
|
|
220
216
|
|
|
221
217
|
/*
|
|
222
218
|
* Copyright (c) 2015 NAVER Corp.
|
|
@@ -2866,7 +2862,7 @@ var SnapControl = /*#__PURE__*/function (_super) {
|
|
|
2866
2862
|
if (!activeAnchor || !anchorAtCamera) {
|
|
2867
2863
|
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
2868
2864
|
}
|
|
2869
|
-
var snapThreshold = this._calcSnapThreshold(position, activeAnchor);
|
|
2865
|
+
var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);
|
|
2870
2866
|
var posDelta = flicking.animating ? state.delta : position - camera.position;
|
|
2871
2867
|
var absPosDelta = Math.abs(posDelta);
|
|
2872
2868
|
var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta;
|
|
@@ -2953,7 +2949,7 @@ var SnapControl = /*#__PURE__*/function (_super) {
|
|
|
2953
2949
|
var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
|
|
2954
2950
|
return adjacentAnchor;
|
|
2955
2951
|
};
|
|
2956
|
-
__proto._calcSnapThreshold = function (position, activeAnchor) {
|
|
2952
|
+
__proto._calcSnapThreshold = function (threshold, position, activeAnchor) {
|
|
2957
2953
|
var isNextDirection = position > activeAnchor.position;
|
|
2958
2954
|
var panel = activeAnchor.panel;
|
|
2959
2955
|
var panelSize = panel.size;
|
|
@@ -2964,7 +2960,7 @@ var SnapControl = /*#__PURE__*/function (_super) {
|
|
|
2964
2960
|
* |<------>|<------------>|
|
|
2965
2961
|
* [ |<-Anchor ]
|
|
2966
2962
|
*/
|
|
2967
|
-
return isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev;
|
|
2963
|
+
return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev);
|
|
2968
2964
|
};
|
|
2969
2965
|
return SnapControl;
|
|
2970
2966
|
}(Control);
|
|
@@ -4169,11 +4165,13 @@ var Camera = /*#__PURE__*/function () {
|
|
|
4169
4165
|
* @return {AnchorPoint | null}
|
|
4170
4166
|
*/
|
|
4171
4167
|
__proto.findActiveAnchor = function () {
|
|
4168
|
+
var _a;
|
|
4172
4169
|
var flicking = getFlickingAttached(this._flicking);
|
|
4173
|
-
var
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4170
|
+
var activePanel = flicking.control.activePanel;
|
|
4171
|
+
if (!activePanel) return null;
|
|
4172
|
+
return (_a = find(this._anchors, function (anchor) {
|
|
4173
|
+
return anchor.panel.index === activePanel.index;
|
|
4174
|
+
})) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
|
|
4177
4175
|
};
|
|
4178
4176
|
/**
|
|
4179
4177
|
* Clamp the given position between camera's range
|
|
@@ -7580,6 +7578,10 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
7580
7578
|
return [4 /*yield*/, renderer.forceRenderAllPanels()];
|
|
7581
7579
|
case 1:
|
|
7582
7580
|
_a.sent(); // Render all panel elements, to update sizes
|
|
7581
|
+
if (!this._initialized) {
|
|
7582
|
+
return [2 /*return*/];
|
|
7583
|
+
}
|
|
7584
|
+
|
|
7583
7585
|
renderer.updatePanelSize();
|
|
7584
7586
|
camera.updateAlignPos();
|
|
7585
7587
|
camera.updateRange();
|
|
@@ -7590,6 +7592,10 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
7590
7592
|
return [4 /*yield*/, renderer.render()];
|
|
7591
7593
|
case 2:
|
|
7592
7594
|
_a.sent();
|
|
7595
|
+
if (!this._initialized) {
|
|
7596
|
+
return [2 /*return*/];
|
|
7597
|
+
}
|
|
7598
|
+
|
|
7593
7599
|
if (control.animating) ; else {
|
|
7594
7600
|
control.updatePosition(prevProgressInPanel);
|
|
7595
7601
|
control.updateInput();
|
|
@@ -7826,7 +7832,7 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
7826
7832
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7827
7833
|
* ```
|
|
7828
7834
|
*/
|
|
7829
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
7835
|
+
Flicking.VERSION = "4.11.3-beta.4";
|
|
7830
7836
|
return Flicking;
|
|
7831
7837
|
}(Component);
|
|
7832
7838
|
|