Closed b95505017 closed 3 years ago
It might due to the handling of pointer input differences between Zoomable
and HorizontalPager
. I haven't look into HorizontalPager
yet but I think I can fix it (if you're using accompanist's HorizontalPager).
Thanks! Yes I'm using accompanist's HorizontalPager.
Hi, I've tested Zoomable
with HorizontalPager
but I can not reproduce the issue, can you provide a sample that can reproduce the issue?
@Tlaster Just try latest sample, now the behavior changed. I can't flip to next page until I zoom out to original size.
This behavior is by design right now, there's only PointerInputChange.consumePositionChange()
, which means that we can only consume both Y change and X change, not a single of them.
For example when we drag to the right edge of child and try to drag to the next pager's page, but the child still can be dragged vertically, so it's hard to determinate whether the Zoomable
should consume the touch event.
I remember there's PointerInputChange.consumePositionChange(x, y)
before which can consume the right X or Y change, but it's gone now.
Got it, thanks for investigation!
I'm not sure where this issue should belongs to.
In traditional Pager2 & PhotoView world, I could keep dragging a zoomed photo without flip to next page until I drag to the edge of the photo. But in
Zoomable
it would flip to next/previous page anytime I drag horizontally.