Description
I have a circular flicking with strict moveType that consists of three panels, all of them full screen.
I have buttons to call next() and previous() as well as the normal swipe motion.
However, when I'm on the first panel (index 0) and trigger prev(), the direction in WillChangeEvent.direction is "NEXT". However, if it's triggered by a swipe, the event returns the correct direction (in this case: "PREV"). The same happens in the opposite side of the panels. e.g. when I'm on the last panel and call next(), the WillChangeEvent.direction is "PREV". If triggered by swipe, the direction will be correct.
Steps to check or reproduce
The following code returns wrong direction on .prev() at first panel and next() on last panel:
<SomeButton onClick={() => await flickRef.current.prev()} />
<Flicking
ref={flickRef}
circular
duration={600}
threshold={40}
align={"center"}
onWillChange={(e: WillChangeEvent) => {
console.log("WILL CHANGE", e);
flickStart(e.index, e.direction);
}}
onChanged={(e: ChangedEvent) => {
console.log("DID CHANGE", e);
flickEnd(e.index);
}}
moveType={"strict"}
changeOnHold={true}
>
...
</Flicking>
Also, thanks a bunch for all the work you put in. Great package overall!
Description
I have a circular flicking with strict moveType that consists of three panels, all of them full screen.
I have buttons to call next() and previous() as well as the normal swipe motion.
However, when I'm on the first panel (index 0) and trigger prev(), the direction in WillChangeEvent.direction is "NEXT". However, if it's triggered by a swipe, the event returns the correct direction (in this case: "PREV"). The same happens in the opposite side of the panels. e.g. when I'm on the last panel and call next(), the WillChangeEvent.direction is "PREV". If triggered by swipe, the direction will be correct.
Steps to check or reproduce
The following code returns wrong direction on .prev() at first panel and next() on last panel:
Also, thanks a bunch for all the work you put in. Great package overall!