-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hello,
I noticed the source code for calculating zoom levels, as shown below:
internal fun calculateZoom(
zoomLevel: ZoomLevel,
initial: Float,
min: Float,
max: Float
): Pair<ZoomLevel, Float> {
val newZoomLevel: ZoomLevel
val newZoom: Float
when (zoomLevel) {
ZoomLevel.Mid -> {
newZoomLevel = ZoomLevel.Max
newZoom = max.coerceAtMost(3f)
}
ZoomLevel.Max -> {
newZoomLevel = ZoomLevel.Min
newZoom = if (min == initial) initial else min
}
else -> {
newZoomLevel = ZoomLevel.Mid
newZoom = if (min == initial) (min + max.coerceAtMost(3f)) / 2 else initial
}
}
return Pair(newZoomLevel, newZoom)
}
Is it possible for the library to support not only three zoom levels but also two zoom levels?
Thank you.
Metadata
Metadata
Assignees
Labels
No labels