@egjs/flicking 4.13.2-beta.0 → 4.13.2-beta.1
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/core-packages-link.js +38 -0
- package/debug/example/index.html +82 -0
- package/declaration/Flicking.d.ts +12 -1
- package/declaration/control/Control.d.ts +1 -1
- package/declaration/core/AutoResizer.d.ts +5 -0
- package/dist/flicking.cjs.js +202 -25
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +202 -25
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +202 -25
- 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 +202 -25
- 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 +522 -153
- package/src/camera/mode/CameraMode.ts +2 -1
- package/src/control/Control.ts +1 -1
- package/src/control/SnapControl.ts +1 -8
- package/src/core/AutoResizer.ts +110 -11
- package/src/renderer/Renderer.ts +13 -0
- package/src/utils.ts +6 -1
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.13.2-beta.
|
|
7
|
+
version: 4.13.2-beta.1
|
|
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')) :
|
|
@@ -687,6 +687,9 @@ version: 4.13.2-beta.0
|
|
|
687
687
|
};
|
|
688
688
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
689
689
|
var getStyle = function (el) {
|
|
690
|
+
if (!el) {
|
|
691
|
+
return {};
|
|
692
|
+
}
|
|
690
693
|
return window.getComputedStyle(el) || el.currentStyle;
|
|
691
694
|
};
|
|
692
695
|
var setSize = function (el, _a) {
|
|
@@ -994,13 +997,59 @@ version: 4.13.2-beta.0
|
|
|
994
997
|
return Viewport;
|
|
995
998
|
}();
|
|
996
999
|
|
|
1000
|
+
/*
|
|
1001
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
1002
|
+
* egjs projects are licensed under the MIT license
|
|
1003
|
+
*/
|
|
1004
|
+
/**
|
|
1005
|
+
* A component that detects size change and trigger resize method when the autoResize option is used
|
|
1006
|
+
* @ko autoResize 옵션을 사용할 때 크기 변화를 감지하고 Flicking의 resize를 호출하는 컴포넌트
|
|
1007
|
+
*/
|
|
997
1008
|
var AutoResizer = /*#__PURE__*/function () {
|
|
998
1009
|
function AutoResizer(flicking) {
|
|
999
1010
|
var _this = this;
|
|
1000
|
-
this.
|
|
1011
|
+
this._onResizeWrapper = function () {
|
|
1012
|
+
_this._onResize([]);
|
|
1013
|
+
};
|
|
1014
|
+
this._onResize = function (entries) {
|
|
1001
1015
|
var flicking = _this._flicking;
|
|
1002
1016
|
var resizeDebounce = flicking.resizeDebounce;
|
|
1003
1017
|
var maxResizeDebounce = flicking.maxResizeDebounce;
|
|
1018
|
+
var resizedViewportElement = flicking.element;
|
|
1019
|
+
// 현재 구현에서 리사이즈 옵저빙 대상은 패널과 뷰포트 2개만 존재.
|
|
1020
|
+
// 아래는 뷰포트만 변경되었을 때 동작해야하는 로직이 있으므로 아래와 같이 조건문을 건다.
|
|
1021
|
+
// 패널 쪽에서는 리사이즈 감지에 resizeObserver를 사용하지 않는 경우가 없으므로 이 조건은 곧 뷰포트만 리사이즈가 된 경우를 의미한다.
|
|
1022
|
+
var isResizedViewportOnly = entries.find(function (e) {
|
|
1023
|
+
return e.target === flicking.element;
|
|
1024
|
+
}) && entries.length === 1;
|
|
1025
|
+
// 참고: resizeObserver를 사용하지 않은 경우에는 entries.length가 0으로 오는데 이 경우에는 그냥 항상 리사이즈가 진행되도록 한다.
|
|
1026
|
+
// (vw, vh 등을 사용하는 경우 이상 동작이 발생할 여지가 있기 때문이다)
|
|
1027
|
+
if (isResizedViewportOnly) {
|
|
1028
|
+
// resize 이벤트가 발생했으나 이전과 width, height의 변화가 없다면 이후 로직을 진행하지 않는다.
|
|
1029
|
+
var beforeSize = {
|
|
1030
|
+
width: flicking.viewport.width,
|
|
1031
|
+
height: flicking.viewport.height
|
|
1032
|
+
};
|
|
1033
|
+
var afterSize = {
|
|
1034
|
+
width: getElementSize({
|
|
1035
|
+
el: resizedViewportElement,
|
|
1036
|
+
horizontal: true,
|
|
1037
|
+
useFractionalSize: _this._flicking.useFractionalSize,
|
|
1038
|
+
useOffset: false,
|
|
1039
|
+
style: getStyle(resizedViewportElement)
|
|
1040
|
+
}),
|
|
1041
|
+
height: getElementSize({
|
|
1042
|
+
el: resizedViewportElement,
|
|
1043
|
+
horizontal: false,
|
|
1044
|
+
useFractionalSize: _this._flicking.useFractionalSize,
|
|
1045
|
+
useOffset: false,
|
|
1046
|
+
style: getStyle(resizedViewportElement)
|
|
1047
|
+
})
|
|
1048
|
+
};
|
|
1049
|
+
if (beforeSize.height === afterSize.height && beforeSize.width === afterSize.width) {
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1004
1053
|
if (resizeDebounce <= 0) {
|
|
1005
1054
|
void flicking.resize();
|
|
1006
1055
|
} else {
|
|
@@ -1026,12 +1075,12 @@ version: 4.13.2-beta.0
|
|
|
1026
1075
|
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
1027
1076
|
this._skipFirstResize = function () {
|
|
1028
1077
|
var isFirstResize = true;
|
|
1029
|
-
return function () {
|
|
1078
|
+
return function (entries) {
|
|
1030
1079
|
if (isFirstResize) {
|
|
1031
1080
|
isFirstResize = false;
|
|
1032
1081
|
return;
|
|
1033
1082
|
}
|
|
1034
|
-
_this._onResize();
|
|
1083
|
+
_this._onResize(entries);
|
|
1035
1084
|
};
|
|
1036
1085
|
}();
|
|
1037
1086
|
this._flicking = flicking;
|
|
@@ -1057,14 +1106,46 @@ version: 4.13.2-beta.0
|
|
|
1057
1106
|
if (flicking.useResizeObserver && !!window.ResizeObserver) {
|
|
1058
1107
|
var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;
|
|
1059
1108
|
var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize);
|
|
1060
|
-
resizeObserver.observe(flicking.viewport.element);
|
|
1061
1109
|
this._resizeObserver = resizeObserver;
|
|
1110
|
+
this.observe(flicking.viewport.element);
|
|
1111
|
+
if (flicking.observePanelResize) {
|
|
1112
|
+
this.observePanels();
|
|
1113
|
+
}
|
|
1062
1114
|
} else {
|
|
1063
|
-
window.addEventListener("resize", this.
|
|
1115
|
+
window.addEventListener("resize", this._onResizeWrapper);
|
|
1064
1116
|
}
|
|
1065
1117
|
this._enabled = true;
|
|
1066
1118
|
return this;
|
|
1067
1119
|
};
|
|
1120
|
+
__proto.observePanels = function () {
|
|
1121
|
+
var _this = this;
|
|
1122
|
+
this._flicking.panels.forEach(function (panel) {
|
|
1123
|
+
_this.observe(panel.element);
|
|
1124
|
+
});
|
|
1125
|
+
return this;
|
|
1126
|
+
};
|
|
1127
|
+
__proto.unobservePanels = function () {
|
|
1128
|
+
var _this = this;
|
|
1129
|
+
this._flicking.panels.forEach(function (panel) {
|
|
1130
|
+
_this.unobserve(panel.element);
|
|
1131
|
+
});
|
|
1132
|
+
return this;
|
|
1133
|
+
};
|
|
1134
|
+
__proto.observe = function (element) {
|
|
1135
|
+
var resizeObserver = this._resizeObserver;
|
|
1136
|
+
if (!resizeObserver) return this;
|
|
1137
|
+
resizeObserver.observe(element);
|
|
1138
|
+
return this;
|
|
1139
|
+
};
|
|
1140
|
+
__proto.unobserve = function (element) {
|
|
1141
|
+
var resizeObserver = this._resizeObserver;
|
|
1142
|
+
if (!resizeObserver) return this;
|
|
1143
|
+
resizeObserver.unobserve(element);
|
|
1144
|
+
if (this._flicking.observePanelResize) {
|
|
1145
|
+
this.unobservePanels();
|
|
1146
|
+
}
|
|
1147
|
+
return this;
|
|
1148
|
+
};
|
|
1068
1149
|
__proto.disable = function () {
|
|
1069
1150
|
if (!this._enabled) return this;
|
|
1070
1151
|
var resizeObserver = this._resizeObserver;
|
|
@@ -1072,7 +1153,7 @@ version: 4.13.2-beta.0
|
|
|
1072
1153
|
resizeObserver.disconnect();
|
|
1073
1154
|
this._resizeObserver = null;
|
|
1074
1155
|
} else {
|
|
1075
|
-
window.removeEventListener("resize", this.
|
|
1156
|
+
window.removeEventListener("resize", this._onResizeWrapper);
|
|
1076
1157
|
}
|
|
1077
1158
|
this._enabled = false;
|
|
1078
1159
|
return this;
|
|
@@ -2963,11 +3044,7 @@ version: 4.13.2-beta.0
|
|
|
2963
3044
|
if (snapDelta >= snapThreshold && snapDelta > 0) {
|
|
2964
3045
|
// Move to anchor at position
|
|
2965
3046
|
targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);
|
|
2966
|
-
|
|
2967
|
-
// const nextPosition = this._getPosition(targetPanel, DIRECTION.NEXT);
|
|
2968
|
-
// const prevPosition = this._getPosition(targetPanel, DIRECTION.PREV);
|
|
2969
|
-
// targetPosition = Math.abs(camera.position - nextPosition) < Math.abs(camera.position - prevPosition) ? nextPosition : prevPosition;
|
|
2970
|
-
} else if (absPosDelta >= flicking.threshold && absPosDelta > 0 && anchorAtCamera === activeAnchor) {
|
|
3047
|
+
} else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {
|
|
2971
3048
|
// Move to the adjacent panel
|
|
2972
3049
|
targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
|
|
2973
3050
|
} else {
|
|
@@ -2995,7 +3072,6 @@ version: 4.13.2-beta.0
|
|
|
2995
3072
|
if (!anchorAtCamera || !anchorAtPosition) {
|
|
2996
3073
|
throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE);
|
|
2997
3074
|
}
|
|
2998
|
-
// console.log("_findSnappedAnchor", anchorAtPosition);
|
|
2999
3075
|
if (!isFinite(count)) {
|
|
3000
3076
|
return anchorAtPosition;
|
|
3001
3077
|
}
|
|
@@ -3437,7 +3513,10 @@ version: 4.13.2-beta.0
|
|
|
3437
3513
|
};
|
|
3438
3514
|
__proto.findAnchorIncludePosition = function (position) {
|
|
3439
3515
|
var anchors = this._flicking.camera.anchorPoints;
|
|
3440
|
-
|
|
3516
|
+
var anchorsIncludingPosition = anchors.filter(function (anchor) {
|
|
3517
|
+
return anchor.panel.includePosition(position, true);
|
|
3518
|
+
});
|
|
3519
|
+
return anchorsIncludingPosition.reduce(function (nearest, anchor) {
|
|
3441
3520
|
if (!nearest) return anchor;
|
|
3442
3521
|
return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor;
|
|
3443
3522
|
}, null);
|
|
@@ -4906,6 +4985,18 @@ version: 4.13.2-beta.0
|
|
|
4906
4985
|
var activePanel = control.activePanel;
|
|
4907
4986
|
// Update camera & control
|
|
4908
4987
|
this._updateCameraAndControl();
|
|
4988
|
+
if (flicking.autoResize && flicking.useResizeObserver) {
|
|
4989
|
+
panelsAdded.forEach(function (panel) {
|
|
4990
|
+
if (panel.element) {
|
|
4991
|
+
flicking.autoResizer.observe(panel.element);
|
|
4992
|
+
}
|
|
4993
|
+
});
|
|
4994
|
+
panelsRemoved.forEach(function (panel) {
|
|
4995
|
+
if (panel.element) {
|
|
4996
|
+
flicking.autoResizer.unobserve(panel.element);
|
|
4997
|
+
}
|
|
4998
|
+
});
|
|
4999
|
+
}
|
|
4909
5000
|
void this.render();
|
|
4910
5001
|
if (!flicking.animating) {
|
|
4911
5002
|
if (!activePanel || activePanel.removed) {
|
|
@@ -6197,18 +6288,23 @@ version: 4.13.2-beta.0
|
|
|
6197
6288
|
useResizeObserver = _9 === void 0 ? true : _9,
|
|
6198
6289
|
_10 = _b.resizeDebounce,
|
|
6199
6290
|
resizeDebounce = _10 === void 0 ? 0 : _10,
|
|
6200
|
-
_11 = _b.
|
|
6201
|
-
|
|
6202
|
-
_12 = _b.
|
|
6203
|
-
|
|
6204
|
-
_13 = _b.
|
|
6205
|
-
|
|
6206
|
-
_14 = _b.
|
|
6207
|
-
|
|
6291
|
+
_11 = _b.observePanelResize,
|
|
6292
|
+
observePanelResize = _11 === void 0 ? false : _11,
|
|
6293
|
+
_12 = _b.maxResizeDebounce,
|
|
6294
|
+
maxResizeDebounce = _12 === void 0 ? 100 : _12,
|
|
6295
|
+
_13 = _b.useFractionalSize,
|
|
6296
|
+
useFractionalSize = _13 === void 0 ? false : _13,
|
|
6297
|
+
_14 = _b.externalRenderer,
|
|
6298
|
+
externalRenderer = _14 === void 0 ? null : _14,
|
|
6299
|
+
_15 = _b.renderExternal,
|
|
6300
|
+
renderExternal = _15 === void 0 ? null : _15,
|
|
6301
|
+
_16 = _b.optimizeSizeUpdate,
|
|
6302
|
+
optimizeSizeUpdate = _16 === void 0 ? false : _16;
|
|
6208
6303
|
var _this = _super.call(this) || this;
|
|
6209
6304
|
// Internal states
|
|
6210
6305
|
_this._initialized = false;
|
|
6211
6306
|
_this._plugins = [];
|
|
6307
|
+
_this._isResizing = false;
|
|
6212
6308
|
// Bind options
|
|
6213
6309
|
_this._align = align;
|
|
6214
6310
|
_this._defaultIndex = defaultIndex;
|
|
@@ -6244,9 +6340,11 @@ version: 4.13.2-beta.0
|
|
|
6244
6340
|
_this._useResizeObserver = useResizeObserver;
|
|
6245
6341
|
_this._resizeDebounce = resizeDebounce;
|
|
6246
6342
|
_this._maxResizeDebounce = maxResizeDebounce;
|
|
6343
|
+
_this._observePanelResize = observePanelResize;
|
|
6247
6344
|
_this._useFractionalSize = useFractionalSize;
|
|
6248
6345
|
_this._externalRenderer = externalRenderer;
|
|
6249
6346
|
_this._renderExternal = renderExternal;
|
|
6347
|
+
_this._optimizeSizeUpdate = optimizeSizeUpdate;
|
|
6250
6348
|
// Create core components
|
|
6251
6349
|
_this._viewport = new Viewport(_this, getElement(root));
|
|
6252
6350
|
_this._autoResizer = new AutoResizer(_this);
|
|
@@ -6327,6 +6425,19 @@ version: 4.13.2-beta.0
|
|
|
6327
6425
|
enumerable: false,
|
|
6328
6426
|
configurable: true
|
|
6329
6427
|
});
|
|
6428
|
+
Object.defineProperty(__proto, "autoResizer", {
|
|
6429
|
+
/**
|
|
6430
|
+
* {@link AutoResizer} instance of the Flicking
|
|
6431
|
+
* @ko 현재 Flicking에 활성화된 {@link AutoResizer} 인스턴스
|
|
6432
|
+
* @internal
|
|
6433
|
+
* @readonly
|
|
6434
|
+
*/
|
|
6435
|
+
get: function () {
|
|
6436
|
+
return this._autoResizer;
|
|
6437
|
+
},
|
|
6438
|
+
enumerable: false,
|
|
6439
|
+
configurable: true
|
|
6440
|
+
});
|
|
6330
6441
|
Object.defineProperty(__proto, "initialized", {
|
|
6331
6442
|
// Internal States
|
|
6332
6443
|
/**
|
|
@@ -7200,6 +7311,9 @@ version: 4.13.2-beta.0
|
|
|
7200
7311
|
// OTHERS
|
|
7201
7312
|
set: function (val) {
|
|
7202
7313
|
this._autoResize = val;
|
|
7314
|
+
if (!this._initialized) {
|
|
7315
|
+
return;
|
|
7316
|
+
}
|
|
7203
7317
|
if (val) {
|
|
7204
7318
|
this._autoResizer.enable();
|
|
7205
7319
|
} else {
|
|
@@ -7222,13 +7336,38 @@ version: 4.13.2-beta.0
|
|
|
7222
7336
|
},
|
|
7223
7337
|
set: function (val) {
|
|
7224
7338
|
this._useResizeObserver = val;
|
|
7225
|
-
if (this._autoResize) {
|
|
7339
|
+
if (this._initialized && this._autoResize) {
|
|
7226
7340
|
this._autoResizer.enable();
|
|
7227
7341
|
}
|
|
7228
7342
|
},
|
|
7229
7343
|
enumerable: false,
|
|
7230
7344
|
configurable: true
|
|
7231
7345
|
});
|
|
7346
|
+
Object.defineProperty(__proto, "observePanelResize", {
|
|
7347
|
+
/**
|
|
7348
|
+
* Whether to use {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver} to observe the size of the panel element
|
|
7349
|
+
* This is only available when `useResizeObserver` is enabled.
|
|
7350
|
+
* This option garantees that the resize event is triggered when the size of the panel element is changed.
|
|
7351
|
+
* @ko 이 옵션을 활성화할 경우, {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}를 사용하여 패널 엘리먼트의 크기를 추적합니다.
|
|
7352
|
+
* 이 옵션은 `useResizeObserver` 옵션이 활성화된 경우에만 사용할 수 있습니다.
|
|
7353
|
+
* 이 옵션은 패널 엘리먼트의 크기가 변경될 경우 resize 이벤트가 발생하도록 보장합니다.
|
|
7354
|
+
*/
|
|
7355
|
+
get: function () {
|
|
7356
|
+
return this._observePanelResize;
|
|
7357
|
+
},
|
|
7358
|
+
set: function (val) {
|
|
7359
|
+
this._observePanelResize = val;
|
|
7360
|
+
if (this._initialized && this._autoResize) {
|
|
7361
|
+
if (val) {
|
|
7362
|
+
this._autoResizer.observePanels();
|
|
7363
|
+
} else {
|
|
7364
|
+
this._autoResizer.unobservePanels();
|
|
7365
|
+
}
|
|
7366
|
+
}
|
|
7367
|
+
},
|
|
7368
|
+
enumerable: false,
|
|
7369
|
+
configurable: true
|
|
7370
|
+
});
|
|
7232
7371
|
Object.defineProperty(__proto, "resizeDebounce", {
|
|
7233
7372
|
/**
|
|
7234
7373
|
* Delays size recalculation from `autoResize` by the given time in milisecond.
|
|
@@ -7310,6 +7449,30 @@ version: 4.13.2-beta.0
|
|
|
7310
7449
|
enumerable: false,
|
|
7311
7450
|
configurable: true
|
|
7312
7451
|
});
|
|
7452
|
+
Object.defineProperty(__proto, "optimizeSizeUpdate", {
|
|
7453
|
+
/**
|
|
7454
|
+
* This option works only when autoResize is set to true.
|
|
7455
|
+
* By default, autoResize listens to changes in both the viewport's width and height, updating all panel sizes accordingly.
|
|
7456
|
+
* When optimizeSizeUpdate is enabled, the update behavior is optimized based on the flicking direction:
|
|
7457
|
+
* If direction is "horizontal", only changes in width will trigger panel size updates.
|
|
7458
|
+
* If direction is "vertical", only changes in height will do so.
|
|
7459
|
+
* This option is useful when panel heights vary and unwanted flickering occurs due to frequent size recalculations during flicking. Enabling optimizeSizeUpdate prevents unnecessary updates and helps maintain visual stability.
|
|
7460
|
+
* @ko optimizeSizeUpdate는 autoResize가 true일 때만 동작합니다.
|
|
7461
|
+
* 기본적으로 autoResize는 뷰포트의 width와 height 변화를 모두 감지하여 패널들의 사이즈를 업데이트합니다.
|
|
7462
|
+
* 이 옵션을 활성화하면 플리킹 방향에 따라 필요한 차원(horizontal → width, vertical → height)에 대해서만 사이즈를 업데이트합니다.
|
|
7463
|
+
* 내부 패널의 높이가 서로 다를 때, 플리킹 중 과도한 리사이징으로 인한 깜빡임 현상을 줄이는 데 유용합니다.
|
|
7464
|
+
* @type {boolean}
|
|
7465
|
+
* @default false
|
|
7466
|
+
*/
|
|
7467
|
+
get: function () {
|
|
7468
|
+
return this._optimizeSizeUpdate;
|
|
7469
|
+
},
|
|
7470
|
+
set: function (val) {
|
|
7471
|
+
this._optimizeSizeUpdate = val;
|
|
7472
|
+
},
|
|
7473
|
+
enumerable: false,
|
|
7474
|
+
configurable: true
|
|
7475
|
+
});
|
|
7313
7476
|
/**
|
|
7314
7477
|
* Initialize Flicking and move to the default index
|
|
7315
7478
|
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
@@ -7748,6 +7911,8 @@ version: 4.13.2-beta.0
|
|
|
7748
7911
|
return __generator(this, function (_a) {
|
|
7749
7912
|
switch (_a.label) {
|
|
7750
7913
|
case 0:
|
|
7914
|
+
if (this._isResizing) return [2 /*return*/];
|
|
7915
|
+
this._isResizing = true;
|
|
7751
7916
|
viewport = this._viewport;
|
|
7752
7917
|
renderer = this._renderer;
|
|
7753
7918
|
camera = this._camera;
|
|
@@ -7762,9 +7927,20 @@ version: 4.13.2-beta.0
|
|
|
7762
7927
|
element: viewport.element
|
|
7763
7928
|
}));
|
|
7764
7929
|
viewport.resize();
|
|
7930
|
+
if (!this._optimizeSizeUpdate) return [3 /*break*/, 3];
|
|
7931
|
+
if (!(this.horizontal && viewport.width !== prevWidth || !this.horizontal && viewport.height !== prevHeight)) return [3 /*break*/, 2];
|
|
7765
7932
|
return [4 /*yield*/, renderer.forceRenderAllPanels()];
|
|
7766
7933
|
case 1:
|
|
7934
|
+
_a.sent();
|
|
7935
|
+
_a.label = 2;
|
|
7936
|
+
case 2:
|
|
7937
|
+
return [3 /*break*/, 5];
|
|
7938
|
+
case 3:
|
|
7939
|
+
return [4 /*yield*/, renderer.forceRenderAllPanels()];
|
|
7940
|
+
case 4:
|
|
7767
7941
|
_a.sent(); // Render all panel elements, to update sizes
|
|
7942
|
+
_a.label = 5;
|
|
7943
|
+
case 5:
|
|
7768
7944
|
if (!this._initialized) {
|
|
7769
7945
|
return [2 /*return*/];
|
|
7770
7946
|
}
|
|
@@ -7777,7 +7953,7 @@ version: 4.13.2-beta.0
|
|
|
7777
7953
|
camera.updatePanelOrder();
|
|
7778
7954
|
camera.updateOffset();
|
|
7779
7955
|
return [4 /*yield*/, renderer.render()];
|
|
7780
|
-
case
|
|
7956
|
+
case 6:
|
|
7781
7957
|
_a.sent();
|
|
7782
7958
|
if (!this._initialized) {
|
|
7783
7959
|
return [2 /*return*/];
|
|
@@ -7800,6 +7976,7 @@ version: 4.13.2-beta.0
|
|
|
7800
7976
|
sizeChanged: sizeChanged,
|
|
7801
7977
|
element: viewport.element
|
|
7802
7978
|
}));
|
|
7979
|
+
this._isResizing = false;
|
|
7803
7980
|
return [2 /*return*/];
|
|
7804
7981
|
}
|
|
7805
7982
|
});
|
|
@@ -8019,7 +8196,7 @@ version: 4.13.2-beta.0
|
|
|
8019
8196
|
* Flicking.VERSION; // ex) 4.0.0
|
|
8020
8197
|
* ```
|
|
8021
8198
|
*/
|
|
8022
|
-
Flicking.VERSION = "4.13.2-beta.
|
|
8199
|
+
Flicking.VERSION = "4.13.2-beta.1";
|
|
8023
8200
|
return Flicking;
|
|
8024
8201
|
}(Component);
|
|
8025
8202
|
|