@egjs/flicking 4.11.3-beta.1 → 4.11.3-beta.2

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.
@@ -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.1
7
+ version: 4.11.3-beta.2
8
8
  */
9
9
  import Component, { ComponentEvent } from '@egjs/component';
10
10
  import Axes, { PanInput } from '@egjs/axes';
@@ -2593,7 +2593,7 @@ var Control = /*#__PURE__*/function () {
2593
2593
  var position;
2594
2594
  return __generator(this, function (_c) {
2595
2595
  position = this._getPosition(panel, direction);
2596
- this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
2596
+ this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
2597
2597
  return [2 /*return*/, this._animateToPosition({
2598
2598
  position: position,
2599
2599
  duration: duration,
@@ -2635,7 +2635,7 @@ var Control = /*#__PURE__*/function () {
2635
2635
  this._activePanel = control._activePanel;
2636
2636
  this._controller = control._controller;
2637
2637
  };
2638
- __proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
2638
+ __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
2639
2639
  var _a;
2640
2640
  var flicking = getFlickingAttached(this._flicking);
2641
2641
  var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
@@ -2645,7 +2645,7 @@ var Control = /*#__PURE__*/function () {
2645
2645
  index: panel.index,
2646
2646
  panel: panel,
2647
2647
  isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
2648
- direction: getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
2648
+ direction: direction !== null && direction !== void 0 ? direction : getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
2649
2649
  });
2650
2650
  this._nextPanel = panel;
2651
2651
  flicking.trigger(event);
@@ -4169,13 +4169,11 @@ var Camera = /*#__PURE__*/function () {
4169
4169
  * @return {AnchorPoint | null}
4170
4170
  */
4171
4171
  __proto.findActiveAnchor = function () {
4172
- var _a;
4173
4172
  var flicking = getFlickingAttached(this._flicking);
4174
- var activePanel = flicking.control.activePanel;
4175
- if (!activePanel) return null;
4176
- return (_a = find(this._anchors, function (anchor) {
4177
- return anchor.panel.index === activePanel.index;
4178
- })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
4173
+ var activeIndex = flicking.control.activeIndex;
4174
+ return find(this._anchors, function (anchor) {
4175
+ return anchor.panel.index === activeIndex;
4176
+ });
4179
4177
  };
4180
4178
  /**
4181
4179
  * Clamp the given position between camera's range
@@ -7828,7 +7826,7 @@ var Flicking = /*#__PURE__*/function (_super) {
7828
7826
  * Flicking.VERSION; // ex) 4.0.0
7829
7827
  * ```
7830
7828
  */
7831
- Flicking.VERSION = "4.11.3-beta.1";
7829
+ Flicking.VERSION = "4.11.3-beta.2";
7832
7830
  return Flicking;
7833
7831
  }(Component);
7834
7832