MinimumScaleMode.Fit and coordinates
See original GitHub issueHey,
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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (6 by maintainers)
Top Results From Across the Web
Approximating the Equation of a Line of Best Fit and Making ...
Find the coordinates of the points we identified. Step 2: Find the slope of the line using the points. Find the slope of...
Read more >Line of Best Fit Equation (by hand) o Graph the coordinates on ...
Line of Best Fit Equation (by hand) o Graph the coordinates on a scatterplot. o Draw a line going through the approximate center...
Read more >How to Find the Line of Best Fit in 3 Steps - TutorMe
For example, the first y-coordinate is 1. y-coordinate is 6, so formula 4 = -5. how to find line of best fit: formula...
Read more >Line of Best Fit - National Council of Teachers of Mathematics
Use this activity to practice how to enter a set of data, plot the data on a coordinate grid, and determine the equation...
Read more >Creating a Best Fit Coordinate System
This tool is designed to relate a local coordinate system to a projected or geodetic system, by creating a Fitted Coordinate system using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the fix.
setClipChildren( false );
has to be added inMarkerLayout
constructor too. In that particular case, theMarkerLayout
was clipping its child view.2.2.1 is out