NextGIS Frontend
    Preparing search index...

    Interface ToggleControlOptions

    interface ToggleControlOptions {
        addClass?: string;
        addClassOff?: string;
        addClassOn?: string;
        disableOnSecondClick?: boolean;
        getStatus?: () => boolean;
        html?: HtmlDef | HtmlToggle;
        margin?: boolean;
        onClick?: OnToggleClick;
        status?: boolean;
        switch?: string | boolean;
        title?: string | TitleToggle;
    }
    Index
    addClass?: string

    Additional css class string

    addClassOff?: string

    Additional css class string for off state only.

    addClassOn?: string

    Additional css class string for on state only.

    disableOnSecondClick?: boolean

    Prevents a user click from turning an active toggle off. Explicit onClick(false) calls can still switch it off.

    getStatus?: () => boolean

    Get current control status.

    Button content, can be set for each state (on or off).

    margin?: boolean

    Set standard outer offset. Enabled by default for bar controls.

    onClick?: OnToggleClick

    Set an action to execute when button clicked.

    status?: boolean

    Boolean state of control.

    switch?: string | boolean

    Enables switch mode for toggles added to the same control container.

    If true, the toggle joins the default switch group for its container. If a string is set, only toggles with the same string are switched together.

    title?: string | TitleToggle

    Button HTMLElement title, can be set for each state (on or off).