Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-firmansyah authored Jan 24, 2025
2 parents 5f64127 + f48f421 commit 8743eb0
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ public class StreetViewCameraPositionState private constructor() {
* @param source the source of the panoramas
*/
public fun setPosition(position: LatLng, radius: Int? = null, source: StreetViewSource? = null) {
if (radius == null && source == null) {
panorama?.setPosition(position)
} else if (radius != null && source == null) {
panorama?.setPosition(position, radius)
} else if (radius != null) {
panorama?.setPosition(position, radius, source)
when {
radius != null && source != null -> panorama?.setPosition(position, radius, source)
radius != null -> panorama?.setPosition(position, radius)
else -> panorama?.setPosition(position)
}
}

Expand All @@ -96,4 +94,4 @@ public class StreetViewCameraPositionState private constructor() {
public operator fun invoke(): StreetViewCameraPositionState =
StreetViewCameraPositionState()
}
}
}

0 comments on commit 8743eb0

Please sign in to comment.