@egjs/flicking 4.11.3-beta.1 → 4.11.3-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/control/Control.d.ts +1 -1
- package/dist/flicking.cjs.js +9 -11
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +9 -11
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +9 -11
- 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 +9 -11
- 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/camera/Camera.ts +2 -4
- package/src/control/Control.ts +3 -3
package/package.json
CHANGED
package/src/camera/Camera.ts
CHANGED
|
@@ -404,11 +404,9 @@ class Camera {
|
|
|
404
404
|
*/
|
|
405
405
|
public findActiveAnchor(): AnchorPoint | null {
|
|
406
406
|
const flicking = getFlickingAttached(this._flicking);
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
if (!activePanel) return null;
|
|
407
|
+
const activeIndex = flicking.control.activeIndex;
|
|
410
408
|
|
|
411
|
-
return find(this._anchors, anchor => anchor.panel.index ===
|
|
409
|
+
return find(this._anchors, anchor => anchor.panel.index === activeIndex);
|
|
412
410
|
}
|
|
413
411
|
|
|
414
412
|
/**
|
package/src/control/Control.ts
CHANGED
|
@@ -306,7 +306,7 @@ abstract class Control {
|
|
|
306
306
|
axesEvent?: OnRelease;
|
|
307
307
|
}) {
|
|
308
308
|
const position = this._getPosition(panel, direction);
|
|
309
|
-
this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
|
|
309
|
+
this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
|
|
310
310
|
|
|
311
311
|
return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });
|
|
312
312
|
}
|
|
@@ -347,7 +347,7 @@ abstract class Control {
|
|
|
347
347
|
this._controller = control._controller;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease) {
|
|
350
|
+
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf<typeof DIRECTION>) {
|
|
351
351
|
const flicking = getFlickingAttached(this._flicking);
|
|
352
352
|
const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
|
|
353
353
|
const camera = flicking.camera;
|
|
@@ -357,7 +357,7 @@ abstract class Control {
|
|
|
357
357
|
index: panel.index,
|
|
358
358
|
panel,
|
|
359
359
|
isTrusted: axesEvent?.isTrusted || false,
|
|
360
|
-
direction: getDirection(activePanel?.position ?? camera.position, position)
|
|
360
|
+
direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)
|
|
361
361
|
});
|
|
362
362
|
|
|
363
363
|
this._nextPanel = panel;
|