Props for the controls component.

interface ControlsComponentProps {
    buttons?: ControlsComponentButtons;
    clear?: boolean;
    clearMessage?: string;
    onMaybeClear?: ((doClear) => void);
    orientation?: "row" | "column";
    surface: Surface;
    undoRedo?: boolean;
    zoomToExtents?: boolean;
}

Properties

buttons?: ControlsComponentButtons

Optional extra buttons to add to the controls component.

clear?: boolean

Whether or not to show the clear button, defaults to true.

clearMessage?: string

Optional message for the alert that the clear button shows by default. Defaults to Clear dataset?.

onMaybeClear?: ((doClear) => void)

Optional callback to invoke when the user presses the clear button. If you provide this, the component will not show an alert and instead call this method, passing in a function you can invoke if you wish to continue with the clear operation.

Type declaration

    • (doClear): void
    • Parameters

      • doClear: (() => void)
          • (): void
          • Returns void

      Returns void

orientation?: "row" | "column"

Optional orientation for the controls. Defaults to 'row'.

surface: Surface

The surface to attach to.

undoRedo?: boolean

Whether or not to show undo/redo buttons, defaults to true

zoomToExtents?: boolean

Whether or not to show the zoom to extents button, defaults to true

Version :