mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
478 stars 134 forks source link

ScaleBar is not correctly aligned when using an End alignment #2492

Open adesentenac opened 1 month ago

adesentenac commented 1 month ago

Environment

Observed behavior and steps to reproduce

When using the ScaleBar (with Compose) with an End alignment (e.g. TopEnd), the ScaleBar is not correctly aligned at the end, because it seems to reserve space to grow at the end.

Using the following configuration:

scaleBar = {
    ScaleBar(
        modifier = Modifier.background(Color.Magenta),
        alignment = Alignment.TopEnd,
    )
}

Expected behavior

Instead in that case, the ScaleBar should be end aligned and it should grow towards the start as needed.

Additional links and references

image