You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
My initial idea was that this is related to screen density since the devices having this issue were mostly newer devices with a large pixel ratio. Now looking into the code I'm seeing that this is not related to the x,y value of pixels but that issue is coming from detector.getScaleFactor() that is used as part of zoomBy in the gesture shown in the OP.
My hunch is that scale factor is too large due to screen density (this value is coming from an external dependency and we would have to work around this in our code) or that the values we are feeding core are not correct (eg. negative values or spike values, in normal situations I'm seeing logs with values around 1 but when a major shift happens I'm seeing a sole value that is negative (eg -0.56) or a value that is way larger as the rest (eg. 14).
Activity
tobrun commentedon Jan 3, 2017
My initial idea was that this is related to screen density since the devices having this issue were mostly newer devices with a large pixel ratio. Now looking into the code I'm seeing that this is not related to the x,y value of pixels but that issue is coming from
detector.getScaleFactor()that is used as part ofzoomByin the gesture shown in the OP.My hunch is that scale factor is too large due to screen density (this value is coming from an external dependency and we would have to work around this in our code) or that the values we are feeding core are not correct (eg. negative values or spike values, in normal situations I'm seeing logs with values around 1 but when a major shift happens I'm seeing a sole value that is negative (eg -0.56) or a value that is way larger as the rest (eg. 14).
tobrun commentedon Jan 3, 2017
Here are some sequences of scale factors provided to the SDK from our gesture detector library:
V/MapGestureDetector$ScaleGestureListener: Scale 1.0046271
V/MapGestureDetector$ScaleGestureListener: Scale 1.0089378
V/MapGestureDetector$ScaleGestureListener: Scale 1.0184126
V/MapGestureDetector$ScaleGestureListener: Scale 1.0239114
V/MapGestureDetector$ScaleGestureListener: Scale 1.046406
V/MapGestureDetector$ScaleGestureListener: Scale 1.0642886
V/MapGestureDetector$ScaleGestureListener: Scale 1.080839
V/MapGestureDetector$ScaleGestureListener: Scale 1.119591
V/MapGestureDetector$ScaleGestureListener: Scale 1.1630605
V/MapGestureDetector$ScaleGestureListener: Scale 1.250629
V/MapGestureDetector$ScaleGestureListener: Scale 0.53555655
V/MapGestureDetector$ScaleGestureListener: Scale 8.800293
V/MapGestureDetector$ScaleGestureListener: Scale 1.4822774
V/MapGestureDetector$ScaleGestureListener: Scale 1.2489731
V/MapGestureDetector$ScaleGestureListener: Scale 1.1681666
V/MapGestureDetector$ScaleGestureListener: Scale 1.1117692
V/MapGestureDetector$ScaleGestureListener: Scale 1.0839446
V/MapGestureDetector$ScaleGestureListener: Scale 1.0684125
V/MapGestureDetector$ScaleGestureListener: Scale 1.0564218
V/MapGestureDetector$ScaleGestureListener: Scale 1.0442512
V/MapGestureDetector$ScaleGestureListener: Scale 1.0412383
V/MapGestureDetector$ScaleGestureListener: Scale 1.0306668
V/MapGestureDetector$ScaleGestureListener: Scale 1.0241464
V/MapGestureDetector$ScaleGestureListener: Scale 1.0180855
or
V/MapGestureDetector$ScaleGestureListener: Scale 0.946373
V/MapGestureDetector$ScaleGestureListener: Scale 0.9367054
V/MapGestureDetector$ScaleGestureListener: Scale 0.91751075
V/MapGestureDetector$ScaleGestureListener: Scale 0.89154875
V/MapGestureDetector$ScaleGestureListener: Scale 0.8659967
V/MapGestureDetector$ScaleGestureListener: Scale 0.8338932
V/MapGestureDetector$ScaleGestureListener: Scale 0.76041627
V/MapGestureDetector$ScaleGestureListener: Scale 0.5274352
V/MapGestureDetector$ScaleGestureListener: Scale -7.3576527
V/MapGestureDetector$ScaleGestureListener: Scale 0.4487716
V/MapGestureDetector$ScaleGestureListener: Scale 0.74890393
V/MapGestureDetector$ScaleGestureListener: Scale 0.8576364
V/MapGestureDetector$ScaleGestureListener: Scale 0.90766495
V/MapGestureDetector$ScaleGestureListener: Scale 0.94259167
V/MapGestureDetector$ScaleGestureListener: Scale 0.95532775
V/MapGestureDetector$ScaleGestureListener: Scale 0.976783
V/MapGestureDetector$ScaleGestureListener: Scale 0.98298824
V/MapGestureDetector$ScaleGestureListener: Scale 0.9842705
V/MapGestureDetector$ScaleGestureListener: Scale 0.9980335
V/MapGestureDetector$ScaleGestureListener: Scale 1.0029142
I'm currently trying out the latter approach in #7514 (comment) and allowing values >0.8 and <1.2.