Can conflict with AxisMilestone and EventBody.

Hierarchy

Constructors

Properties

canvas: HTMLCanvasElement

The canvas where component draw on.

container: HTMLElement

The container which contain all of component's element.

destroyed: boolean = false

Means that the component has been destroyed. Call any method on component when it has destroyed will got an error.

drawInfo: DrawInfo = ...

All info about draw. Except drawInfo, no more states be depended about draw. The same drawInfo must has same drawn on canvas and container. The this.gird should be merging in there in this.apply be called. Must can unscathed passed this.drawInfo = JSON.parse(JSON.stringify(this.drawInfo)).

element: HTMLElement = ...

An EventBody must has a HTML element for allow user select and copy text from EventBody.

Manage all extensions & Help component communicate for each other.

extraData: ExtraData = {}

An ext extra

See

ExtraData

name: SN = SN.EventBody

Component name. Be filled when the engine's class constructed.

ratio: number = ...

A ratio for draw, it's using when draw on High DPI display

theme: string

Theme name. Be filled when the theme's class constructed.

Accessors

  • get l(): ((stringArr: TemplateStringsArray, ...values: any[]) => void)
  • Print log if the DEBUG is true.

    Example

    this.lHello world

    Returns ((stringArr: TemplateStringsArray, ...values: any[]) => void)

      • (stringArr: TemplateStringsArray, ...values: any[]): void
      • Parameters

        • stringArr: TemplateStringsArray
        • Rest ...values: any[]

        Returns void

Methods

  • Apply this.drawInfo in component. This method should't change any property in this.drawInfo except this.drawInfo.box.

    Async

    Returns Promise<MustCallAndReturnSuperMethod>

  • Create a box object to fill this.drawInfo.box. It should be called in apply() at least once. Write this method if you need to change the behavior about box.

    Returns void

  • Optional. Depend on the draw this component is need HTML element or not. Create an HTML element base on this.drawInfo to fill this.element and append to this.container. Be called in this.apply and this.draw.

    Returns MustCallAndReturnSuperMethod

  • Destroy self. It should remove all element from dom and clear all trace in canvas if that's made by self.

    Returns MustCallAndReturnSuperMethod

  • Draw self base on this.drawInfo. It should can be call multiple times. Call this.apply before this.draw.

    Returns MustCallAndReturnSuperMethod

  • Hide all of trace created by self. Hidden is not destroyed. Ensure the component is still available when this.hide have call. This method will try set "visibility: 'hidden'" for this.element rather than remove it.

    Returns MustCallAndReturnSuperMethod

Generated using TypeDoc