@egjs/flicking 4.10.5 → 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.
@@ -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
7
+ version: 4.10.6
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -6883,11 +6883,9 @@ version: 4.10.5
6883
6883
 
6884
6884
 
6885
6885
  __proto.animateTo = function (position, duration, axesEvent) {
6886
- var _a;
6887
-
6888
6886
  var _this = this;
6889
6887
 
6890
- var _b;
6888
+ var _a;
6891
6889
 
6892
6890
  var axes = this._axes;
6893
6891
  var state = this._stateMachine.state;
@@ -6903,7 +6901,7 @@ version: 4.10.5
6903
6901
  flicking.camera.lookAt(position);
6904
6902
 
6905
6903
  if (state.targetPanel) {
6906
- flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_b = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _b !== void 0 ? _b : false);
6904
+ flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false);
6907
6905
  }
6908
6906
 
6909
6907
  return Promise.resolve();
@@ -6935,30 +6933,21 @@ version: 4.10.5
6935
6933
  }
6936
6934
  };
6937
6935
 
6938
- if (duration === 0) {
6939
- var flicking = getFlickingAttached(this._flicking);
6940
- var camera = flicking.camera;
6941
- animate();
6942
- var newPos = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position;
6943
- axes.axisManager.set((_a = {}, _a[POSITION_KEY] = newPos, _a));
6944
- return Promise.resolve();
6945
- } else {
6946
- return new Promise(function (resolve, reject) {
6947
- var animationFinishHandler = function () {
6948
- axes.off(EVENT.HOLD, interruptionHandler);
6949
- resolve();
6950
- };
6936
+ return new Promise(function (resolve, reject) {
6937
+ var animationFinishHandler = function () {
6938
+ axes.off(EVENT.HOLD, interruptionHandler);
6939
+ resolve();
6940
+ };
6951
6941
 
6952
- var interruptionHandler = function () {
6953
- axes.off(EVENT.FINISH, animationFinishHandler);
6954
- reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED));
6955
- };
6942
+ var interruptionHandler = function () {
6943
+ axes.off(EVENT.FINISH, animationFinishHandler);
6944
+ reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED));
6945
+ };
6956
6946
 
6957
- axes.once(EVENT.FINISH, animationFinishHandler);
6958
- axes.once(EVENT.HOLD, interruptionHandler);
6959
- animate();
6960
- });
6961
- }
6947
+ axes.once(EVENT.FINISH, animationFinishHandler);
6948
+ axes.once(EVENT.HOLD, interruptionHandler);
6949
+ animate();
6950
+ });
6962
6951
  };
6963
6952
 
6964
6953
  __proto.updateDirection = function () {
@@ -9283,7 +9272,7 @@ version: 4.10.5
9283
9272
  var el = this._el;
9284
9273
  var flicking = getFlickingAttached(this._flicking);
9285
9274
  var renderer = flicking.renderer;
9286
- if (renderer.rendering) return this;
9275
+ if (renderer.rendering || !flicking.initialized) return this;
9287
9276
  var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;
9288
9277
  el.style[this._transform] = flicking.horizontal ? "translate(" + -actualPosition + "px)" : "translate(0, " + -actualPosition + "px)";
9289
9278
  return this;
@@ -11024,6 +11013,11 @@ version: 4.10.5
11024
11013
  });
11025
11014
  };
11026
11015
 
11016
+ __proto._afterRender = function () {
11017
+ var flicking = getFlickingAttached(this._flicking);
11018
+ flicking.camera.applyTransform();
11019
+ };
11020
+
11027
11021
  return Renderer;
11028
11022
  }();
11029
11023
 
@@ -11054,6 +11048,8 @@ version: 4.10.5
11054
11048
 
11055
11049
  this._resetPanelElementOrder();
11056
11050
 
11051
+ this._afterRender();
11052
+
11057
11053
  return [2
11058
11054
  /*return*/
11059
11055
  ];
@@ -13412,14 +13408,13 @@ version: 4.10.5
13412
13408
  }
13413
13409
 
13414
13410
  renderer.checkPanelContentsReady(renderer.panels);
13411
+ this._initialized = true;
13415
13412
  return renderer.render().then(function () {
13416
13413
  // Done initializing & emit ready event
13417
13414
  _this._plugins.forEach(function (plugin) {
13418
13415
  return plugin.init(_this);
13419
13416
  });
13420
13417
 
13421
- _this._initialized = true;
13422
-
13423
13418
  if (preventEventsBeforeInit) {
13424
13419
  _this.trigger = originalTrigger;
13425
13420
  }
@@ -14194,7 +14189,7 @@ version: 4.10.5
14194
14189
  */
14195
14190
 
14196
14191
 
14197
- Flicking.VERSION = "4.10.5";
14192
+ Flicking.VERSION = "4.10.6";
14198
14193
  return Flicking;
14199
14194
  }(Component);
14200
14195