@egjs/flicking 4.10.5-beta.0 → 4.10.5

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.
Files changed (72) hide show
  1. package/declaration/Flicking.d.ts +236 -236
  2. package/declaration/camera/Camera.d.ts +82 -82
  3. package/declaration/camera/index.d.ts +4 -4
  4. package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
  5. package/declaration/camera/mode/CameraMode.d.ts +20 -20
  6. package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
  7. package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
  8. package/declaration/camera/mode/index.d.ts +6 -6
  9. package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
  10. package/declaration/cfc/getRenderingPanels.d.ts +4 -4
  11. package/declaration/cfc/index.d.ts +5 -5
  12. package/declaration/cfc/sync.d.ts +4 -4
  13. package/declaration/cfc/withFlickingMethods.d.ts +2 -2
  14. package/declaration/const/axes.d.ts +8 -8
  15. package/declaration/const/error.d.ts +34 -34
  16. package/declaration/const/external.d.ts +44 -44
  17. package/declaration/control/AxesController.d.ts +44 -44
  18. package/declaration/control/Control.d.ts +44 -44
  19. package/declaration/control/FreeControl.d.ts +14 -14
  20. package/declaration/control/SnapControl.d.ts +16 -16
  21. package/declaration/control/StateMachine.d.ts +14 -14
  22. package/declaration/control/StrictControl.d.ts +20 -20
  23. package/declaration/control/index.d.ts +14 -14
  24. package/declaration/control/states/AnimatingState.d.ts +9 -9
  25. package/declaration/control/states/DisabledState.d.ts +9 -9
  26. package/declaration/control/states/DraggingState.d.ts +8 -8
  27. package/declaration/control/states/HoldingState.d.ts +10 -10
  28. package/declaration/control/states/IdleState.d.ts +9 -9
  29. package/declaration/control/states/State.d.ts +47 -47
  30. package/declaration/core/AnchorPoint.d.ts +15 -15
  31. package/declaration/core/AutoResizer.d.ts +16 -16
  32. package/declaration/core/FlickingError.d.ts +5 -5
  33. package/declaration/core/ResizeWatcher.d.ts +33 -33
  34. package/declaration/core/Viewport.d.ts +25 -25
  35. package/declaration/core/VirtualManager.d.ts +37 -37
  36. package/declaration/core/index.d.ts +6 -6
  37. package/declaration/core/panel/Panel.d.ts +89 -89
  38. package/declaration/core/panel/VirtualPanel.d.ts +19 -19
  39. package/declaration/core/panel/index.d.ts +5 -5
  40. package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
  41. package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
  42. package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
  43. package/declaration/core/panel/provider/index.d.ts +5 -5
  44. package/declaration/index.d.ts +13 -13
  45. package/declaration/index.umd.d.ts +2 -2
  46. package/declaration/renderer/ExternalRenderer.d.ts +7 -7
  47. package/declaration/renderer/Renderer.d.ts +58 -58
  48. package/declaration/renderer/VanillaRenderer.d.ts +10 -10
  49. package/declaration/renderer/index.d.ts +6 -6
  50. package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
  51. package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
  52. package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
  53. package/declaration/renderer/strategy/index.d.ts +5 -5
  54. package/declaration/type/event.d.ts +88 -88
  55. package/declaration/type/external.d.ts +31 -31
  56. package/declaration/type/internal.d.ts +13 -13
  57. package/declaration/utils.d.ts +45 -45
  58. package/dist/flicking.esm.js +16 -8
  59. package/dist/flicking.esm.js.map +1 -1
  60. package/dist/flicking.js +16 -8
  61. package/dist/flicking.js.map +1 -1
  62. package/dist/flicking.min.js +2 -2
  63. package/dist/flicking.min.js.map +1 -1
  64. package/dist/flicking.pkgd.js +858 -842
  65. package/dist/flicking.pkgd.js.map +1 -1
  66. package/dist/flicking.pkgd.min.js +2 -2
  67. package/dist/flicking.pkgd.min.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/control/SnapControl.ts +2 -2
  70. package/src/control/StrictControl.ts +9 -3
  71. package/src/core/ResizeWatcher.ts +1 -1
  72. 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.5-beta.0
7
+ version: 4.10.5
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 >= max) {
683
+ } else if (pos > max) {
684
684
  var offset = (pos - max) % size;
685
685
  pos = min + offset;
686
686
  }
@@ -3365,8 +3365,8 @@ version: 4.10.5-beta.0
3365
3365
  // Move to the adjacent panel
3366
3366
  targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
3367
3367
  } else {
3368
- // Restore to active panel
3369
- return this.moveToPanel(activeAnchor.panel, {
3368
+ // Fallback to nearest panel from current camera
3369
+ return this.moveToPanel(anchorAtCamera.panel, {
3370
3370
  duration: duration,
3371
3371
  axesEvent: axesEvent
3372
3372
  });
@@ -3834,9 +3834,17 @@ version: 4.10.5-beta.0
3834
3834
  targetPanel = adjacentAnchor.panel;
3835
3835
  targetPos = adjacentAnchor.position;
3836
3836
  } else {
3837
- // Restore to active panel
3838
- targetPos = camera.clampToReachablePosition(activePanel.position);
3839
- targetPanel = activePanel;
3837
+ // Fallback to nearest panel from current camera
3838
+ var anchorAtCamera = camera.findNearestAnchor(camera.position);
3839
+
3840
+ if (!anchorAtCamera) {
3841
+ return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
3842
+ }
3843
+
3844
+ return this.moveToPanel(anchorAtCamera.panel, {
3845
+ duration: duration,
3846
+ axesEvent: axesEvent
3847
+ });
3840
3848
  }
3841
3849
 
3842
3850
  this._triggerIndexChangeEvent(targetPanel, position, axesEvent);
@@ -8925,7 +8933,7 @@ version: 4.10.5-beta.0
8925
8933
  */
8926
8934
 
8927
8935
 
8928
- Flicking.VERSION = "4.10.5-beta.0";
8936
+ Flicking.VERSION = "4.10.5";
8929
8937
  return Flicking;
8930
8938
  }(Component);
8931
8939