@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.
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.1
7
+ version: 4.11.3-beta.2
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')) :
@@ -2640,7 +2640,7 @@ version: 4.11.3-beta.1
2640
2640
  var position;
2641
2641
  return __generator(this, function (_c) {
2642
2642
  position = this._getPosition(panel, direction);
2643
- this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
2643
+ this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
2644
2644
  return [2 /*return*/, this._animateToPosition({
2645
2645
  position: position,
2646
2646
  duration: duration,
@@ -2682,7 +2682,7 @@ version: 4.11.3-beta.1
2682
2682
  this._activePanel = control._activePanel;
2683
2683
  this._controller = control._controller;
2684
2684
  };
2685
- __proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
2685
+ __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
2686
2686
  var _a;
2687
2687
  var flicking = getFlickingAttached(this._flicking);
2688
2688
  var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
@@ -2692,7 +2692,7 @@ version: 4.11.3-beta.1
2692
2692
  index: panel.index,
2693
2693
  panel: panel,
2694
2694
  isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
2695
- direction: getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
2695
+ 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)
2696
2696
  });
2697
2697
  this._nextPanel = panel;
2698
2698
  flicking.trigger(event);
@@ -4237,13 +4237,11 @@ version: 4.11.3-beta.1
4237
4237
  * @return {AnchorPoint | null}
4238
4238
  */
4239
4239
  __proto.findActiveAnchor = function () {
4240
- var _a;
4241
4240
  var flicking = getFlickingAttached(this._flicking);
4242
- var activePanel = flicking.control.activePanel;
4243
- if (!activePanel) return null;
4244
- return (_a = find(this._anchors, function (anchor) {
4245
- return anchor.panel.index === activePanel.index;
4246
- })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
4241
+ var activeIndex = flicking.control.activeIndex;
4242
+ return find(this._anchors, function (anchor) {
4243
+ return anchor.panel.index === activeIndex;
4244
+ });
4247
4245
  };
4248
4246
  /**
4249
4247
  * Clamp the given position between camera's range
@@ -7923,7 +7921,7 @@ version: 4.11.3-beta.1
7923
7921
  * Flicking.VERSION; // ex) 4.0.0
7924
7922
  * ```
7925
7923
  */
7926
- Flicking.VERSION = "4.11.3-beta.1";
7924
+ Flicking.VERSION = "4.11.3-beta.2";
7927
7925
  return Flicking;
7928
7926
  }(Component);
7929
7927