@egjs/flicking 4.11.5-beta.1 → 4.11.5-beta.3
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 +19 -49
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +19 -49
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +19 -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 +29 -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 +10 -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.3
|
|
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
|
|
|
@@ -3793,6 +3775,7 @@ version: 4.11.5-beta.1
|
|
|
3793
3775
|
var _this = this;
|
|
3794
3776
|
var _b = (_a === void 0 ? {} : _a).align,
|
|
3795
3777
|
align = _b === void 0 ? ALIGN.CENTER : _b;
|
|
3778
|
+
this._lookedOffset = 0;
|
|
3796
3779
|
this._checkTranslateSupport = function () {
|
|
3797
3780
|
var e_1, _a;
|
|
3798
3781
|
var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
|
|
@@ -4152,6 +4135,8 @@ version: 4.11.5-beta.1
|
|
|
4152
4135
|
*/
|
|
4153
4136
|
__proto.lookAt = function (pos) {
|
|
4154
4137
|
var _this = this;
|
|
4138
|
+
var prevOffset = this._offset;
|
|
4139
|
+
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
4155
4140
|
var flicking = getFlickingAttached(this._flicking);
|
|
4156
4141
|
var prevPos = this._position;
|
|
4157
4142
|
this._position = pos;
|
|
@@ -4159,10 +4144,15 @@ version: 4.11.5-beta.1
|
|
|
4159
4144
|
this._refreshVisiblePanels();
|
|
4160
4145
|
this._checkNeedPanel();
|
|
4161
4146
|
this._checkReachEnd(prevPos, pos);
|
|
4162
|
-
if (toggled) {
|
|
4147
|
+
if (isChangedOffset || toggled) {
|
|
4163
4148
|
void flicking.renderer.render().then(function () {
|
|
4164
4149
|
_this.updateOffset();
|
|
4150
|
+
_this._lookedOffset = _this._offset;
|
|
4165
4151
|
});
|
|
4152
|
+
} else if (isChangedOffset) {
|
|
4153
|
+
// sync offset for renderOnlyVisible on resize
|
|
4154
|
+
this.updateOffset();
|
|
4155
|
+
this._lookedOffset = this._offset;
|
|
4166
4156
|
} else {
|
|
4167
4157
|
this.applyTransform();
|
|
4168
4158
|
}
|
|
@@ -4421,6 +4411,7 @@ version: 4.11.5-beta.1
|
|
|
4421
4411
|
};
|
|
4422
4412
|
__proto._resetInternalValues = function () {
|
|
4423
4413
|
this._position = 0;
|
|
4414
|
+
this._lookedOffset = 0;
|
|
4424
4415
|
this._alignPos = 0;
|
|
4425
4416
|
this._offset = 0;
|
|
4426
4417
|
this._circularOffset = 0;
|
|
@@ -4859,11 +4850,6 @@ version: 4.11.5-beta.1
|
|
|
4859
4850
|
var activePanel = control.activePanel;
|
|
4860
4851
|
// Update camera & control
|
|
4861
4852
|
this._updateCameraAndControl();
|
|
4862
|
-
if (flicking.autoResize && flicking.useResizeObserver) {
|
|
4863
|
-
panelsAdded.forEach(function (panel) {
|
|
4864
|
-
flicking.autoResizer.observe(panel.element);
|
|
4865
|
-
});
|
|
4866
|
-
}
|
|
4867
4853
|
void this.render();
|
|
4868
4854
|
if (!flicking.animating) {
|
|
4869
4855
|
if (!activePanel || activePanel.removed) {
|
|
@@ -6279,19 +6265,6 @@ version: 4.11.5-beta.1
|
|
|
6279
6265
|
enumerable: false,
|
|
6280
6266
|
configurable: true
|
|
6281
6267
|
});
|
|
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
6268
|
Object.defineProperty(__proto, "initialized", {
|
|
6296
6269
|
// Internal States
|
|
6297
6270
|
/**
|
|
@@ -7144,9 +7117,6 @@ version: 4.11.5-beta.1
|
|
|
7144
7117
|
// OTHERS
|
|
7145
7118
|
set: function (val) {
|
|
7146
7119
|
this._autoResize = val;
|
|
7147
|
-
if (!this._initialized) {
|
|
7148
|
-
return;
|
|
7149
|
-
}
|
|
7150
7120
|
if (val) {
|
|
7151
7121
|
this._autoResizer.enable();
|
|
7152
7122
|
} else {
|
|
@@ -7169,7 +7139,7 @@ version: 4.11.5-beta.1
|
|
|
7169
7139
|
},
|
|
7170
7140
|
set: function (val) {
|
|
7171
7141
|
this._useResizeObserver = val;
|
|
7172
|
-
if (this.
|
|
7142
|
+
if (this._autoResize) {
|
|
7173
7143
|
this._autoResizer.enable();
|
|
7174
7144
|
}
|
|
7175
7145
|
},
|
|
@@ -7966,7 +7936,7 @@ version: 4.11.5-beta.1
|
|
|
7966
7936
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7967
7937
|
* ```
|
|
7968
7938
|
*/
|
|
7969
|
-
Flicking.VERSION = "4.11.5-beta.
|
|
7939
|
+
Flicking.VERSION = "4.11.5-beta.3";
|
|
7970
7940
|
return Flicking;
|
|
7971
7941
|
}(Component);
|
|
7972
7942
|
|