-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Option to change the zoom rate. Decrease the default zoom rate by 35% #14774
Conversation
On the gif I see that when the scroll happens, you've started with one of the pointers outside of the view bounds (once on the toolbar and once on the system bar), could you retest and see if that might've been the cause (which would've been working as expected)?
Would you suggest to decrease the default rate even more? |
lol that will probably be it, ignore that remark.
I think if we want, we have a case for it. I would try to see what feels most fluent. During development, we do a lot of worldview to high level zoom zooming but irl you don't really do that. That said, if a developer wants to decrease the zoom rate, they can with proposed configuration so 🤷♂️ |
@@ -558,7 +559,7 @@ private double calculateScale(double velocityXY, boolean isScalingOut) { | |||
} | |||
|
|||
private double getNewZoom(float scaleFactor, boolean quickZoom) { | |||
double zoomBy = Math.log(scaleFactor) / Math.log(Math.PI / 2); | |||
double zoomBy = (Math.log(scaleFactor) / Math.log(Math.PI / 2)) * 0.65 * uiSettings.getZoomRate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make 0.65
a constant and name it so it explains its purpose.
* | ||
* @param zoomRate The zoom rate. | ||
*/ | ||
public void setZoomRate(float zoomRate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are only positive numbers supported? if yes, can we add something as @FloatRange(from = 0.0f)
b508218
to
8faf9e1
Compare
8faf9e1
to
865f378
Compare
Closes #14136.
Additionally, changes the default zoom rate by 35% based on community feedback. I'd really appreciate any additional feedback on this change (b03c151) @mapbox/maps-android.