ResetViewWidget
ResetViewWidget is a small icon button widget that invokes a caller-provided “fit/reset view” callback.
Import
import {ResetViewWidget} from '@deck.gl-community/widgets';
Props
type ResetViewWidgetProps = WidgetProps & {
placement?: WidgetPlacement;
label?: string;
onResetView?: () => void;
};
Default props:
id: 'reset-view'placement: 'top-left'label: 'Resize to fit'
Usage
Within this repo it is typically wired to a DeckTraceGraph or controller callback that recomputes visible bounds and resets the camera.
Remarks
- Renders a single icon button.
- Uses
labelfor tooltip and aria label. - Calls
onResetViewwhen clicked.