@egjs/flicking 4.11.5-beta.0 → 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/dist/flicking.cjs.js +16 -27
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +16 -27
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +16 -27
- 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 +26 -44
- 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 +0 -1
- package/src/camera/Camera.ts +9 -1
- package/src/core/AutoResizer.ts +2 -5
- package/src/renderer/Renderer.ts +0 -4
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.0
|
|
|
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.0
|
|
|
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.0
|
|
|
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.0
|
|
|
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.
|
|
@@ -1017,13 +1013,9 @@ version: 4.11.5-beta.0
|
|
|
1017
1013
|
}
|
|
1018
1014
|
if (flicking.useResizeObserver && !!window.ResizeObserver) {
|
|
1019
1015
|
var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;
|
|
1020
|
-
var
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
})).forEach(function (element) {
|
|
1024
|
-
resizeObserver_1.observe(element);
|
|
1025
|
-
});
|
|
1026
|
-
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;
|
|
1027
1019
|
} else {
|
|
1028
1020
|
window.addEventListener("resize", this._onResize);
|
|
1029
1021
|
}
|
|
@@ -4142,6 +4134,8 @@ version: 4.11.5-beta.0
|
|
|
4142
4134
|
*/
|
|
4143
4135
|
__proto.lookAt = function (pos) {
|
|
4144
4136
|
var _this = this;
|
|
4137
|
+
var prevOffset = this._offset;
|
|
4138
|
+
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
4145
4139
|
var flicking = getFlickingAttached(this._flicking);
|
|
4146
4140
|
var prevPos = this._position;
|
|
4147
4141
|
this._position = pos;
|
|
@@ -4149,10 +4143,15 @@ version: 4.11.5-beta.0
|
|
|
4149
4143
|
this._refreshVisiblePanels();
|
|
4150
4144
|
this._checkNeedPanel();
|
|
4151
4145
|
this._checkReachEnd(prevPos, pos);
|
|
4152
|
-
if (toggled) {
|
|
4146
|
+
if (isChangedOffset || toggled) {
|
|
4153
4147
|
void flicking.renderer.render().then(function () {
|
|
4154
4148
|
_this.updateOffset();
|
|
4149
|
+
_this._lookedOffset = _this._offset;
|
|
4155
4150
|
});
|
|
4151
|
+
} else if (isChangedOffset) {
|
|
4152
|
+
// sync offset for renderOnlyVisible on resize
|
|
4153
|
+
this.updateOffset();
|
|
4154
|
+
this._lookedOffset = this._offset;
|
|
4156
4155
|
} else {
|
|
4157
4156
|
this.applyTransform();
|
|
4158
4157
|
}
|
|
@@ -4849,9 +4848,6 @@ version: 4.11.5-beta.0
|
|
|
4849
4848
|
var activePanel = control.activePanel;
|
|
4850
4849
|
// Update camera & control
|
|
4851
4850
|
this._updateCameraAndControl();
|
|
4852
|
-
if (flicking.autoResize) {
|
|
4853
|
-
flicking.autoResizer.enable();
|
|
4854
|
-
}
|
|
4855
4851
|
void this.render();
|
|
4856
4852
|
if (!flicking.animating) {
|
|
4857
4853
|
if (!activePanel || activePanel.removed) {
|
|
@@ -6267,13 +6263,6 @@ version: 4.11.5-beta.0
|
|
|
6267
6263
|
enumerable: false,
|
|
6268
6264
|
configurable: true
|
|
6269
6265
|
});
|
|
6270
|
-
Object.defineProperty(__proto, "autoResizer", {
|
|
6271
|
-
get: function () {
|
|
6272
|
-
return this._autoResizer;
|
|
6273
|
-
},
|
|
6274
|
-
enumerable: false,
|
|
6275
|
-
configurable: true
|
|
6276
|
-
});
|
|
6277
6266
|
Object.defineProperty(__proto, "initialized", {
|
|
6278
6267
|
// Internal States
|
|
6279
6268
|
/**
|
|
@@ -7945,7 +7934,7 @@ version: 4.11.5-beta.0
|
|
|
7945
7934
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7946
7935
|
* ```
|
|
7947
7936
|
*/
|
|
7948
|
-
Flicking.VERSION = "4.11.5-beta.
|
|
7937
|
+
Flicking.VERSION = "4.11.5-beta.2";
|
|
7949
7938
|
return Flicking;
|
|
7950
7939
|
}(Component);
|
|
7951
7940
|
|