-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MinimumScaleMode.Fit and coordinates #338
Comments
I can confirm this. I tested the changes suggested and it fixes the issue, although i'm not yet sure this is the correct way to fix this nor this won't have side effects. Nevertheless, the changes can be seen on my fork, banch @moagrius you can check the changes, and if you agree i can PR. FYI, i logged the values of |
i commented your fork peter |
@moagrius it looks ok for me. It fixes the markers part. One last thing is the HotSpots (aka |
@moagrius looks good to me, too. |
@krabo0om your HotSpots are working even when you have white spaces (in FIT mode)? |
@peterLaurence yeah they do 😄 |
Ok i must be missing something. Good news anyway. |
Try to set the visibility of the marker to |
the view's visibility is not affected it's always |
I could not get the |
I can't reproduce on my side. Callouts stay visible even when outside and when a child view's visibility is set to [EDIT] I could reproduce by playing with the |
So as a workaround, you can adjust the |
this works for now (I used |
I found the fix. |
I can confirm it's working with |
okay I hope this is the last thing: Callouts won't be closed when tapping in the whitespace.
|
the time difference is a killer! anyways, IIUC i need to add 2 things:
i'll post those, let me know if i missed anything, otherwise i'll generate a release tomorrow thanks guys |
ok it's up |
Looks good to me. Though i noticed that a touch inside a |
it will unless the callout view consumes the event (e.g., with a click listener) thanks peter, i'll bump versions and generate a release i appreciate all your help, as always |
2.2.1 is out |
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()
withtranslateX
andtranslateY
and should be used to offset theMotionEvent
theonTouchEvent()
gets.The text was updated successfully, but these errors were encountered: