Skip to content

Problem customizing RegionPicker component #104

@Jakidxav

Description

@Jakidxav

I am having trouble customizing the <RegionPicker /> component. I want to create a <RegionPicker /> with a set radius without the floating handle, similar to the look and functionality of the region picker in the ncview-js package. I feel like this should be as easy as setting the FLOATING_HANDLE variable to False before it gets read into the <CircleRenderer /> component, but I am having trouble mixing pre-built components from imports ('@carbonplan/components') and customizing them from src/.

simplified_region_picker

I want to be able to see the value (or average value) of the <Raster /> component within particular cells at a given resolution (~1km, in my case). However, this is problematic when the minRadius prop is quite small, where the floating handle blocks grabbing and moving the <RegionPicker />. I experimented with creating a <RegionPicker /> with a set radius (minRadius = maxRadius), but didn't have any luck there, either, as the floating handle just spins around the central point without moving at lower resolutions.

default_region_picker region_picker_close_up

Would the dev team consider adding in the ability to remove the floating handle portion of the <RegionPicker /> via a prop in the future?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions