-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Description
Hey,
thanks to @tsuijten and @PeterLaurence PR #318 introduced the MinimumScaleMode.Fit
mode adding whitespaces when totally zoomed out.
However, this broke the coordinates of tap events. A short example:
Lets say I have an image of 1000 width * 500 height and set MinimumScaleMode.FIT
. Zoomed totally in at 1.0 and tapping the lower right I get x,y of 1000,500. Fine.
Zooming out it adds the whitespaces and centres the image, also fine. However, if I tap the lower right now I get x,y of something like 1000,2500 because the added whitespace.
This offset is calculated in ZoomPanLayout.onLayout()
with translateX
and translateY
and should be used to offset the MotionEvent
the onTouchEvent()
gets.
Metadata
Metadata
Assignees
Labels
No labels