question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MinimumScaleMode.Fit and coordinates

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
p-lrcommented, Aug 23, 2016

I found the fix. setClipChildren( false ); has to be added in MarkerLayout constructor too. In that particular case, the MarkerLayout was clipping its child view.

1reaction
moagriuscommented, Aug 23, 2016

2.2.1 is out

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found