Interface SidePanel

An interface panel appearing beside a Shell that contains Palettes of clickable controls.

Hierarchy

  • SidePanel

Index

Properties

label

label: string

Gets or sets the panel's label for accessibility (ARIA) purposes; this must have a valid value.

open

open: boolean

Gets or sets whether the panel is open. Closing a panel makes more space for the View.

Readonly paletteCount

paletteCount: number

Gets the number of palettes that are children of this panel.

Readonly rootElement

rootElement: HTMLElement

Gets the DOM element that contains the panel interface.

Methods

appendChild

  • appendChild(newChild: Palette): void
  • Adds the specified Palette to the end of this panel.

    Parameters

    • newChild: Palette

      The Palette to add to this panel.

    Returns void

createPalette

  • Creates a new Palette from the specified template. The new Palette can then be added to this panel, or any other panel from the same Shell.

    Parameters

    • template: PaletteTemplate

      A template describing the layout of Palette controls.

    Returns Palette

    The new Palette.

createStandardPalette

  • createStandardPalette(name: "complexNumbers" | StandardPalette | "arithmetic" | "sets" | "logic" | "functions" | "trigonometry" | "greek" | "combinatorics" | "matrices" | "calculus" | "geometry" | "groupTheory" | "chemistry" | "computing" | "memory" | "editing", variant?: StandardPaletteVariant | "standard" | "compact"): Palette
  • Creates a new Palette with the same controls and layout as one of the standard built-in palettes. Throws an Error if the name is invalid. If the palette in question does not have a variant of the specified type, a valid variant will be substituted.

    see

    supportedPalettes

    Parameters

    • name: "complexNumbers" | StandardPalette | "arithmetic" | "sets" | "logic" | "functions" | "trigonometry" | "greek" | "combinatorics" | "matrices" | "calculus" | "geometry" | "groupTheory" | "chemistry" | "computing" | "memory" | "editing"

      The name of the standard palette, such as "arithmetic".

    • Optional variant: StandardPaletteVariant | "standard" | "compact"

      The keyword describing which variant of the panel to create; the default is taken from the NewShellOptions used to create the Shell.

    Returns Palette

    A palette with the same functionality as the named palette.

focus

  • focus(): void
  • Focuses on the panel, allowing the controls to be navigated using the keyboard.

    Returns void

getPalette

  • getPalette(index: number): Palette
  • Returns the Palette at the specified position in the panel. Throws an Error if the index is invalid.

    Parameters

    • index: number

      The position of the Palette in the panel, from 0 to paletteCount-1.

    Returns Palette

    The palette at the requested position.

indexOf

  • Returns the position of the specified Palette in this panel's children, or -1 if it is not a child.

    Parameters

    • child: Palette

      The Palette to find.

    Returns number

insertBefore

  • Inserts a Palette into this panel before the position of the specified reference Palette.

    Parameters

    • newChild: Palette

      The Palette to add to this panel.

    • refChild: Palette

      The Palette to place the new Palette before.

    Returns void

remove

  • Removes the specified Palette from the panel, if it is a child of the panel. The Palette can be moved by inserting it into a new position or panel. If the Palette is no longer needed, call Palette.dispose instead.

    Parameters

    • child: Palette

      The Palette to remove from the panel.

    Returns void

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.