re_component_ui 0.31.0

Provides ui editors for Rerun component data for registration with the Rerun Viewer component ui registry.
Documentation
use re_format::format_lat_lon;
use re_sdk_types::components::LatLon;
use re_ui::UiExt as _;
use re_viewer_context::{MaybeMutRef, StoreViewContext, UiLayout};

pub fn singleline_view_lat_lon(
    _ctx: &StoreViewContext<'_>,
    ui: &mut egui::Ui,
    value: &mut MaybeMutRef<'_, LatLon>,
) -> egui::Response {
    let value = value.as_ref();
    UiLayout::List
        .label(
            ui,
            format!(
                "{}, {}",
                format_lat_lon(value.latitude()),
                format_lat_lon(value.longitude())
            ),
        )
        .on_hover_ui(|ui| {
            ui.markdown_ui("Latitude and longitude according to [EPSG:4326](https://epsg.io/4326)");
        })
}