@egjs/flicking 4.11.5-beta.1 → 4.11.5-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/declaration/Flicking.d.ts +0 -2
- package/declaration/camera/Camera.d.ts +1 -0
- package/declaration/core/AutoResizer.d.ts +0 -1
- package/dist/flicking.cjs.js +17 -49
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +17 -49
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +17 -49
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +27 -66
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/Flicking.ts +1 -12
- package/src/camera/Camera.ts +9 -1
- package/src/core/AutoResizer.ts +1 -16
- package/src/renderer/Renderer.ts +0 -6
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.5-beta.
|
|
7
|
+
version: 4.11.5-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')) :
|
|
@@ -12,7 +12,7 @@ version: 4.11.5-beta.1
|
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory(global.eg.Component, global.eg.Axes, global.eg.ImReady));
|
|
13
13
|
})(this, (function (Component, Axes, ImReady) { 'use strict';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/*! *****************************************************************************
|
|
16
16
|
Copyright (c) Microsoft Corporation.
|
|
17
17
|
|
|
18
18
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -26,7 +26,7 @@ version: 4.11.5-beta.1
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
/* global Reflect, Promise
|
|
29
|
+
/* global Reflect, Promise */
|
|
30
30
|
|
|
31
31
|
var extendStatics = function (d, b) {
|
|
32
32
|
extendStatics = Object.setPrototypeOf || {
|
|
@@ -111,7 +111,7 @@ version: 4.11.5-beta.1
|
|
|
111
111
|
}
|
|
112
112
|
function step(op) {
|
|
113
113
|
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
-
while (
|
|
114
|
+
while (_) try {
|
|
115
115
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
116
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
117
117
|
switch (op[0]) {
|
|
@@ -215,10 +215,6 @@ version: 4.11.5-beta.1
|
|
|
215
215
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
216
216
|
return ar;
|
|
217
217
|
}
|
|
218
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
219
|
-
var e = new Error(message);
|
|
220
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
221
|
-
};
|
|
222
218
|
|
|
223
219
|
/*
|
|
224
220
|
* Copyright (c) 2015 NAVER Corp.
|
|
@@ -955,10 +951,6 @@ version: 4.11.5-beta.1
|
|
|
955
951
|
return Viewport;
|
|
956
952
|
}();
|
|
957
953
|
|
|
958
|
-
/**
|
|
959
|
-
* A component that detects size change and trigger resize method when the autoResize option is used
|
|
960
|
-
* @ko autoResize 옵션을 사용할 때 크기 변화를 감지하고 Flicking의 resize를 호출하는 컴포넌트
|
|
961
|
-
*/
|
|
962
954
|
var AutoResizer = /*#__PURE__*/function () {
|
|
963
955
|
function AutoResizer(flicking) {
|
|
964
956
|
var _this = this;
|
|
@@ -1021,13 +1013,9 @@ version: 4.11.5-beta.1
|
|
|
1021
1013
|
}
|
|
1022
1014
|
if (flicking.useResizeObserver && !!window.ResizeObserver) {
|
|
1023
1015
|
var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;
|
|
1024
|
-
var
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
})).forEach(function (element) {
|
|
1028
|
-
resizeObserver_1.observe(element);
|
|
1029
|
-
});
|
|
1030
|
-
this._resizeObserver = resizeObserver_1;
|
|
1016
|
+
var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize);
|
|
1017
|
+
resizeObserver.observe(flicking.viewport.element);
|
|
1018
|
+
this._resizeObserver = resizeObserver;
|
|
1031
1019
|
} else {
|
|
1032
1020
|
window.addEventListener("resize", this._onResize);
|
|
1033
1021
|
}
|
|
@@ -1046,12 +1034,6 @@ version: 4.11.5-beta.1
|
|
|
1046
1034
|
this._enabled = false;
|
|
1047
1035
|
return this;
|
|
1048
1036
|
};
|
|
1049
|
-
__proto.observe = function (element) {
|
|
1050
|
-
if (this._resizeObserver) {
|
|
1051
|
-
this._resizeObserver.observe(element);
|
|
1052
|
-
}
|
|
1053
|
-
return this;
|
|
1054
|
-
};
|
|
1055
1037
|
return AutoResizer;
|
|
1056
1038
|
}();
|
|
1057
1039
|
|
|
@@ -4152,6 +4134,8 @@ version: 4.11.5-beta.1
|
|
|
4152
4134
|
*/
|
|
4153
4135
|
__proto.lookAt = function (pos) {
|
|
4154
4136
|
var _this = this;
|
|
4137
|
+
var prevOffset = this._offset;
|
|
4138
|
+
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
4155
4139
|
var flicking = getFlickingAttached(this._flicking);
|
|
4156
4140
|
var prevPos = this._position;
|
|
4157
4141
|
this._position = pos;
|
|
@@ -4159,10 +4143,15 @@ version: 4.11.5-beta.1
|
|
|
4159
4143
|
this._refreshVisiblePanels();
|
|
4160
4144
|
this._checkNeedPanel();
|
|
4161
4145
|
this._checkReachEnd(prevPos, pos);
|
|
4162
|
-
if (toggled) {
|
|
4146
|
+
if (isChangedOffset || toggled) {
|
|
4163
4147
|
void flicking.renderer.render().then(function () {
|
|
4164
4148
|
_this.updateOffset();
|
|
4149
|
+
_this._lookedOffset = _this._offset;
|
|
4165
4150
|
});
|
|
4151
|
+
} else if (isChangedOffset) {
|
|
4152
|
+
// sync offset for renderOnlyVisible on resize
|
|
4153
|
+
this.updateOffset();
|
|
4154
|
+
this._lookedOffset = this._offset;
|
|
4166
4155
|
} else {
|
|
4167
4156
|
this.applyTransform();
|
|
4168
4157
|
}
|
|
@@ -4859,11 +4848,6 @@ version: 4.11.5-beta.1
|
|
|
4859
4848
|
var activePanel = control.activePanel;
|
|
4860
4849
|
// Update camera & control
|
|
4861
4850
|
this._updateCameraAndControl();
|
|
4862
|
-
if (flicking.autoResize && flicking.useResizeObserver) {
|
|
4863
|
-
panelsAdded.forEach(function (panel) {
|
|
4864
|
-
flicking.autoResizer.observe(panel.element);
|
|
4865
|
-
});
|
|
4866
|
-
}
|
|
4867
4851
|
void this.render();
|
|
4868
4852
|
if (!flicking.animating) {
|
|
4869
4853
|
if (!activePanel || activePanel.removed) {
|
|
@@ -6279,19 +6263,6 @@ version: 4.11.5-beta.1
|
|
|
6279
6263
|
enumerable: false,
|
|
6280
6264
|
configurable: true
|
|
6281
6265
|
});
|
|
6282
|
-
Object.defineProperty(__proto, "autoResizer", {
|
|
6283
|
-
/**
|
|
6284
|
-
* {@link AutoResizer} instance of the Flicking
|
|
6285
|
-
* @ko 현재 Flicking에 활성화된 {@link AutoResizer} 인스턴스
|
|
6286
|
-
* @internal
|
|
6287
|
-
* @readonly
|
|
6288
|
-
*/
|
|
6289
|
-
get: function () {
|
|
6290
|
-
return this._autoResizer;
|
|
6291
|
-
},
|
|
6292
|
-
enumerable: false,
|
|
6293
|
-
configurable: true
|
|
6294
|
-
});
|
|
6295
6266
|
Object.defineProperty(__proto, "initialized", {
|
|
6296
6267
|
// Internal States
|
|
6297
6268
|
/**
|
|
@@ -7144,9 +7115,6 @@ version: 4.11.5-beta.1
|
|
|
7144
7115
|
// OTHERS
|
|
7145
7116
|
set: function (val) {
|
|
7146
7117
|
this._autoResize = val;
|
|
7147
|
-
if (!this._initialized) {
|
|
7148
|
-
return;
|
|
7149
|
-
}
|
|
7150
7118
|
if (val) {
|
|
7151
7119
|
this._autoResizer.enable();
|
|
7152
7120
|
} else {
|
|
@@ -7169,7 +7137,7 @@ version: 4.11.5-beta.1
|
|
|
7169
7137
|
},
|
|
7170
7138
|
set: function (val) {
|
|
7171
7139
|
this._useResizeObserver = val;
|
|
7172
|
-
if (this.
|
|
7140
|
+
if (this._autoResize) {
|
|
7173
7141
|
this._autoResizer.enable();
|
|
7174
7142
|
}
|
|
7175
7143
|
},
|
|
@@ -7966,7 +7934,7 @@ version: 4.11.5-beta.1
|
|
|
7966
7934
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7967
7935
|
* ```
|
|
7968
7936
|
*/
|
|
7969
|
-
Flicking.VERSION = "4.11.5-beta.
|
|
7937
|
+
Flicking.VERSION = "4.11.5-beta.2";
|
|
7970
7938
|
return Flicking;
|
|
7971
7939
|
}(Component);
|
|
7972
7940
|
|