@egjs/flicking 4.10.5 → 4.10.7
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/renderer/Renderer.d.ts +1 -0
- package/dist/flicking.esm.js +323 -1450
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +323 -1450
- 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 +371 -1703
- 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 +2 -2
- package/src/Flicking.ts +3 -2
- package/src/camera/Camera.ts +1 -1
- package/src/control/AxesController.ts +14 -29
- package/src/renderer/Renderer.ts +6 -0
- package/src/renderer/VanillaRenderer.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egjs/flicking",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.7",
|
|
4
4
|
"description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.",
|
|
5
5
|
"main": "dist/flicking.js",
|
|
6
6
|
"module": "dist/flicking.esm.js",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"@egjs/axes": "^3.8.3",
|
|
143
143
|
"@egjs/component": "^3.0.1",
|
|
144
144
|
"@egjs/imready": "^1.3.1",
|
|
145
|
-
"@egjs/list-differ": "^1.0.
|
|
145
|
+
"@egjs/list-differ": "^1.0.1"
|
|
146
146
|
},
|
|
147
147
|
"husky": {
|
|
148
148
|
"hooks": {
|
package/src/Flicking.ts
CHANGED
|
@@ -1065,11 +1065,12 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
1065
1065
|
this.disableInput();
|
|
1066
1066
|
}
|
|
1067
1067
|
renderer.checkPanelContentsReady(renderer.panels);
|
|
1068
|
+
this._initialized = true;
|
|
1068
1069
|
|
|
1069
1070
|
return renderer.render().then(() => {
|
|
1070
1071
|
// Done initializing & emit ready event
|
|
1071
1072
|
this._plugins.forEach(plugin => plugin.init(this));
|
|
1072
|
-
|
|
1073
|
+
|
|
1073
1074
|
if (preventEventsBeforeInit) {
|
|
1074
1075
|
this.trigger = originalTrigger;
|
|
1075
1076
|
}
|
|
@@ -1396,7 +1397,7 @@ class Flicking extends Component<FlickingEvents> {
|
|
|
1396
1397
|
renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });
|
|
1397
1398
|
}
|
|
1398
1399
|
|
|
1399
|
-
if (index) {
|
|
1400
|
+
if (index != null) {
|
|
1400
1401
|
const panelIndex = visibleOffset
|
|
1401
1402
|
? index - visibleOffset
|
|
1402
1403
|
: index;
|
package/src/camera/Camera.ts
CHANGED
|
@@ -551,7 +551,7 @@ class Camera {
|
|
|
551
551
|
const flicking = getFlickingAttached(this._flicking);
|
|
552
552
|
const renderer = flicking.renderer;
|
|
553
553
|
|
|
554
|
-
if (renderer.rendering) return this;
|
|
554
|
+
if (renderer.rendering || !flicking.initialized) return this;
|
|
555
555
|
|
|
556
556
|
const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;
|
|
557
557
|
|
|
@@ -8,7 +8,7 @@ import Flicking from "../Flicking";
|
|
|
8
8
|
import FlickingError from "../core/FlickingError";
|
|
9
9
|
import * as AXES from "../const/axes";
|
|
10
10
|
import * as ERROR from "../const/error";
|
|
11
|
-
import {
|
|
11
|
+
import { getFlickingAttached, parseBounce } from "../utils";
|
|
12
12
|
import { ControlParams } from "../type/external";
|
|
13
13
|
|
|
14
14
|
import StateMachine from "./StateMachine";
|
|
@@ -376,37 +376,22 @@ class AxesController {
|
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
379
|
+
return new Promise((resolve, reject) => {
|
|
380
|
+
const animationFinishHandler = () => {
|
|
381
|
+
axes.off(AXES.EVENT.HOLD, interruptionHandler);
|
|
382
|
+
resolve();
|
|
383
|
+
};
|
|
384
384
|
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
const interruptionHandler = () => {
|
|
386
|
+
axes.off(AXES.EVENT.FINISH, animationFinishHandler);
|
|
387
|
+
reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));
|
|
388
|
+
};
|
|
388
389
|
|
|
389
|
-
axes.
|
|
390
|
+
axes.once(AXES.EVENT.FINISH, animationFinishHandler);
|
|
391
|
+
axes.once(AXES.EVENT.HOLD, interruptionHandler);
|
|
390
392
|
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
return new Promise((resolve, reject) => {
|
|
394
|
-
const animationFinishHandler = () => {
|
|
395
|
-
axes.off(AXES.EVENT.HOLD, interruptionHandler);
|
|
396
|
-
resolve();
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
const interruptionHandler = () => {
|
|
400
|
-
axes.off(AXES.EVENT.FINISH, animationFinishHandler);
|
|
401
|
-
reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
axes.once(AXES.EVENT.FINISH, animationFinishHandler);
|
|
405
|
-
axes.once(AXES.EVENT.HOLD, interruptionHandler);
|
|
406
|
-
|
|
407
|
-
animate();
|
|
408
|
-
});
|
|
409
|
-
}
|
|
393
|
+
animate();
|
|
394
|
+
});
|
|
410
395
|
}
|
|
411
396
|
|
|
412
397
|
public updateDirection() {
|
package/src/renderer/Renderer.ts
CHANGED
|
@@ -536,6 +536,12 @@ abstract class Renderer {
|
|
|
536
536
|
cameraElement.removeChild(panel.element);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
|
+
|
|
540
|
+
protected _afterRender() {
|
|
541
|
+
const flicking = getFlickingAttached(this._flicking);
|
|
542
|
+
|
|
543
|
+
flicking.camera.applyTransform();
|
|
544
|
+
}
|
|
539
545
|
}
|
|
540
546
|
|
|
541
547
|
export default Renderer;
|