Options
All
  • Public
  • Public/Protected
  • All
Menu

Class that renders toolbar for graph drawing tool. Defines modes of operation for the tool. Handles transition between modes. Notifies observers about mode changes.

Hierarchy

  • Toolbar

Index

Constructors

constructor

  • Parameters

    • container: HTMLElement

      HTMLElement within toolbar will be rendered.

    • Default value observers: ToolbarObserver[] = []

      Initial observers to be notified when mode changes.

    Returns Toolbar

Properties

Private buttons

buttons: Map<ToolbarMode, HTMLElement>

Buttons that handle control of operation mode.

currentMode

currentMode: ToolbarMode

Current operation mode of the tool.

Private observers

observers: ToolbarObserver[]

Observers to be notified when mode changes.

Methods

changeMode

  • Change current mode of operation. Notifies observers about change.

    Parameters

    Returns void

Protected onClearPress

  • onClearPress(): void
  • Handle toolbar "Clear" button press by notifying observers about it.

    Returns void

registerObserver

removeObserver

  • Removes an observer from observers that are notfied of toolbar mode changes.

    Parameters

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc