@egjs/flicking 4.10.5-beta.0 → 4.10.6
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 +236 -236
- package/declaration/camera/Camera.d.ts +82 -82
- 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 +44 -44
- package/declaration/control/AxesController.d.ts +44 -44
- package/declaration/control/Control.d.ts +44 -44
- 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.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 -58
- 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.esm.js +40 -37
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +40 -37
- 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 +882 -871
- 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 +2 -1
- package/src/camera/Camera.ts +1 -1
- package/src/control/AxesController.ts +14 -29
- package/src/control/SnapControl.ts +2 -2
- package/src/control/StrictControl.ts +9 -3
- package/src/core/ResizeWatcher.ts +1 -1
- package/src/renderer/Renderer.ts +6 -0
- package/src/renderer/VanillaRenderer.ts +1 -0
- package/src/utils.ts +1 -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.6
|
|
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')) :
|
|
@@ -680,7 +680,7 @@ version: 4.10.5-beta.0
|
|
|
680
680
|
if (pos < min) {
|
|
681
681
|
var offset = (min - pos) % size;
|
|
682
682
|
pos = max - offset;
|
|
683
|
-
} else if (pos
|
|
683
|
+
} else if (pos > max) {
|
|
684
684
|
var offset = (pos - max) % size;
|
|
685
685
|
pos = min + offset;
|
|
686
686
|
}
|
|
@@ -2639,11 +2639,9 @@ version: 4.10.5-beta.0
|
|
|
2639
2639
|
|
|
2640
2640
|
|
|
2641
2641
|
__proto.animateTo = function (position, duration, axesEvent) {
|
|
2642
|
-
var _a;
|
|
2643
|
-
|
|
2644
2642
|
var _this = this;
|
|
2645
2643
|
|
|
2646
|
-
var
|
|
2644
|
+
var _a;
|
|
2647
2645
|
|
|
2648
2646
|
var axes = this._axes;
|
|
2649
2647
|
var state = this._stateMachine.state;
|
|
@@ -2659,7 +2657,7 @@ version: 4.10.5-beta.0
|
|
|
2659
2657
|
flicking.camera.lookAt(position);
|
|
2660
2658
|
|
|
2661
2659
|
if (state.targetPanel) {
|
|
2662
|
-
flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (
|
|
2660
|
+
flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false);
|
|
2663
2661
|
}
|
|
2664
2662
|
|
|
2665
2663
|
return Promise.resolve();
|
|
@@ -2691,30 +2689,21 @@ version: 4.10.5-beta.0
|
|
|
2691
2689
|
}
|
|
2692
2690
|
};
|
|
2693
2691
|
|
|
2694
|
-
|
|
2695
|
-
var
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
axes.axisManager.set((_a = {}, _a[POSITION_KEY] = newPos, _a));
|
|
2700
|
-
return Promise.resolve();
|
|
2701
|
-
} else {
|
|
2702
|
-
return new Promise(function (resolve, reject) {
|
|
2703
|
-
var animationFinishHandler = function () {
|
|
2704
|
-
axes.off(EVENT.HOLD, interruptionHandler);
|
|
2705
|
-
resolve();
|
|
2706
|
-
};
|
|
2692
|
+
return new Promise(function (resolve, reject) {
|
|
2693
|
+
var animationFinishHandler = function () {
|
|
2694
|
+
axes.off(EVENT.HOLD, interruptionHandler);
|
|
2695
|
+
resolve();
|
|
2696
|
+
};
|
|
2707
2697
|
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2698
|
+
var interruptionHandler = function () {
|
|
2699
|
+
axes.off(EVENT.FINISH, animationFinishHandler);
|
|
2700
|
+
reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED));
|
|
2701
|
+
};
|
|
2712
2702
|
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2703
|
+
axes.once(EVENT.FINISH, animationFinishHandler);
|
|
2704
|
+
axes.once(EVENT.HOLD, interruptionHandler);
|
|
2705
|
+
animate();
|
|
2706
|
+
});
|
|
2718
2707
|
};
|
|
2719
2708
|
|
|
2720
2709
|
__proto.updateDirection = function () {
|
|
@@ -3365,8 +3354,8 @@ version: 4.10.5-beta.0
|
|
|
3365
3354
|
// Move to the adjacent panel
|
|
3366
3355
|
targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
|
|
3367
3356
|
} else {
|
|
3368
|
-
//
|
|
3369
|
-
return this.moveToPanel(
|
|
3357
|
+
// Fallback to nearest panel from current camera
|
|
3358
|
+
return this.moveToPanel(anchorAtCamera.panel, {
|
|
3370
3359
|
duration: duration,
|
|
3371
3360
|
axesEvent: axesEvent
|
|
3372
3361
|
});
|
|
@@ -3834,9 +3823,17 @@ version: 4.10.5-beta.0
|
|
|
3834
3823
|
targetPanel = adjacentAnchor.panel;
|
|
3835
3824
|
targetPos = adjacentAnchor.position;
|
|
3836
3825
|
} else {
|
|
3837
|
-
//
|
|
3838
|
-
|
|
3839
|
-
|
|
3826
|
+
// Fallback to nearest panel from current camera
|
|
3827
|
+
var anchorAtCamera = camera.findNearestAnchor(camera.position);
|
|
3828
|
+
|
|
3829
|
+
if (!anchorAtCamera) {
|
|
3830
|
+
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
return this.moveToPanel(anchorAtCamera.panel, {
|
|
3834
|
+
duration: duration,
|
|
3835
|
+
axesEvent: axesEvent
|
|
3836
|
+
});
|
|
3840
3837
|
}
|
|
3841
3838
|
|
|
3842
3839
|
this._triggerIndexChangeEvent(targetPanel, position, axesEvent);
|
|
@@ -5031,7 +5028,7 @@ version: 4.10.5-beta.0
|
|
|
5031
5028
|
var el = this._el;
|
|
5032
5029
|
var flicking = getFlickingAttached(this._flicking);
|
|
5033
5030
|
var renderer = flicking.renderer;
|
|
5034
|
-
if (renderer.rendering) return this;
|
|
5031
|
+
if (renderer.rendering || !flicking.initialized) return this;
|
|
5035
5032
|
var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;
|
|
5036
5033
|
el.style[this._transform] = flicking.horizontal ? "translate(" + -actualPosition + "px)" : "translate(0, " + -actualPosition + "px)";
|
|
5037
5034
|
return this;
|
|
@@ -5755,6 +5752,11 @@ version: 4.10.5-beta.0
|
|
|
5755
5752
|
});
|
|
5756
5753
|
};
|
|
5757
5754
|
|
|
5755
|
+
__proto._afterRender = function () {
|
|
5756
|
+
var flicking = getFlickingAttached(this._flicking);
|
|
5757
|
+
flicking.camera.applyTransform();
|
|
5758
|
+
};
|
|
5759
|
+
|
|
5758
5760
|
return Renderer;
|
|
5759
5761
|
}();
|
|
5760
5762
|
|
|
@@ -5785,6 +5787,8 @@ version: 4.10.5-beta.0
|
|
|
5785
5787
|
|
|
5786
5788
|
this._resetPanelElementOrder();
|
|
5787
5789
|
|
|
5790
|
+
this._afterRender();
|
|
5791
|
+
|
|
5788
5792
|
return [2
|
|
5789
5793
|
/*return*/
|
|
5790
5794
|
];
|
|
@@ -8143,14 +8147,13 @@ version: 4.10.5-beta.0
|
|
|
8143
8147
|
}
|
|
8144
8148
|
|
|
8145
8149
|
renderer.checkPanelContentsReady(renderer.panels);
|
|
8150
|
+
this._initialized = true;
|
|
8146
8151
|
return renderer.render().then(function () {
|
|
8147
8152
|
// Done initializing & emit ready event
|
|
8148
8153
|
_this._plugins.forEach(function (plugin) {
|
|
8149
8154
|
return plugin.init(_this);
|
|
8150
8155
|
});
|
|
8151
8156
|
|
|
8152
|
-
_this._initialized = true;
|
|
8153
|
-
|
|
8154
8157
|
if (preventEventsBeforeInit) {
|
|
8155
8158
|
_this.trigger = originalTrigger;
|
|
8156
8159
|
}
|
|
@@ -8925,7 +8928,7 @@ version: 4.10.5-beta.0
|
|
|
8925
8928
|
*/
|
|
8926
8929
|
|
|
8927
8930
|
|
|
8928
|
-
Flicking.VERSION = "4.10.
|
|
8931
|
+
Flicking.VERSION = "4.10.6";
|
|
8929
8932
|
return Flicking;
|
|
8930
8933
|
}(Component);
|
|
8931
8934
|
|