@egjs/flicking 4.9.0 → 4.9.3-beta.0

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.9.0
7
+ version: 4.9.3-beta.0
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')) :
@@ -2496,6 +2496,20 @@ version: 4.9.0
2496
2496
  (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable();
2497
2497
  return this;
2498
2498
  };
2499
+ /**
2500
+ * Releases ongoing user input (mouse/touch)
2501
+ * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
2502
+ * @chainable
2503
+ * @return {this}
2504
+ */
2505
+
2506
+
2507
+ __proto.release = function () {
2508
+ var _a;
2509
+
2510
+ (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release();
2511
+ return this;
2512
+ };
2499
2513
  /**
2500
2514
  * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state
2501
2515
  * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다
@@ -2807,6 +2821,19 @@ version: 4.9.0
2807
2821
 
2808
2822
  return this;
2809
2823
  };
2824
+ /**
2825
+ * Releases ongoing user input (mouse/touch)
2826
+ * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
2827
+ * @chainable
2828
+ * @return {this}
2829
+ */
2830
+
2831
+
2832
+ __proto.release = function () {
2833
+ this._controller.release();
2834
+
2835
+ return this;
2836
+ };
2810
2837
  /**
2811
2838
  * Update position after resizing
2812
2839
  * @ko resize 이후에 position을 업데이트합니다
@@ -5562,11 +5589,13 @@ version: 4.9.0
5562
5589
  } : {
5563
5590
  height: panelSize
5564
5591
  };
5565
- var firstPanelSizeObj = {
5592
+
5593
+ var firstPanelSizeObj = __assign({
5566
5594
  size: panelSize,
5567
- height: referencePanel.height,
5568
5595
  margin: referencePanel.margin
5569
- };
5596
+ }, !flicking.horizontal && {
5597
+ height: referencePanel.height
5598
+ });
5570
5599
 
5571
5600
  if (!flicking.noPanelStyleOverride) {
5572
5601
  this._strategy.updatePanelSizes(flicking, panelSizeObj);
@@ -6100,6 +6129,8 @@ version: 4.9.0
6100
6129
 
6101
6130
 
6102
6131
  __proto.resize = function (cached) {
6132
+ var _a;
6133
+
6103
6134
  var el = this.element;
6104
6135
  var flicking = this._flicking;
6105
6136
  var horizontal = flicking.horizontal,
@@ -6108,7 +6139,13 @@ version: 4.9.0
6108
6139
  if (cached) {
6109
6140
  this._size = cached.size;
6110
6141
  this._margin = __assign({}, cached.margin);
6111
- this._height = cached.height;
6142
+ this._height = (_a = cached.height) !== null && _a !== void 0 ? _a : getElementSize({
6143
+ el: el,
6144
+ horizontal: false,
6145
+ useFractionalSize: useFractionalSize,
6146
+ useOffset: true,
6147
+ style: getStyle(el)
6148
+ });
6112
6149
  } else {
6113
6150
  var elStyle = getStyle(el);
6114
6151
  this._size = getElementSize({
@@ -8084,6 +8121,10 @@ version: 4.9.0
8084
8121
  return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING));
8085
8122
  }
8086
8123
 
8124
+ if (this._control.holding) {
8125
+ this._control.controller.release();
8126
+ }
8127
+
8087
8128
  return this._control.moveToPanel(panel, {
8088
8129
  duration: duration,
8089
8130
  direction: direction
@@ -8568,9 +8609,10 @@ version: 4.9.0
8568
8609
  var renderer = this._renderer;
8569
8610
  var control = this._control;
8570
8611
  var camera = this._camera;
8571
- var initialPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);
8572
- if (!initialPanel) return;
8573
- var nearestAnchor = camera.findNearestAnchor(initialPanel.position);
8612
+ var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);
8613
+ if (!defaultPanel) return;
8614
+ var nearestAnchor = camera.findNearestAnchor(defaultPanel.position);
8615
+ var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel;
8574
8616
  control.setActive(initialPanel, null, false);
8575
8617
 
8576
8618
  if (!nearestAnchor) {
@@ -8631,7 +8673,7 @@ version: 4.9.0
8631
8673
  */
8632
8674
 
8633
8675
 
8634
- Flicking.VERSION = "4.9.0";
8676
+ Flicking.VERSION = "4.9.3-beta.0";
8635
8677
  return Flicking;
8636
8678
  }(Component);
8637
8679