Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Plugin Abstract

desc

Base class for Viewer plugin classes.

Hierarchy

Index

Constructors

  • Creates this Plugin and installs it into the given Viewer.

    Parameters

    • id: string

      ID for this plugin, unique among all plugins in the viewer.

    • viewer: Viewer

      The viewer.

    • Optional cfg: {}

      Returns Plugin

    Properties

    id: string

    ID for this Plugin, unique within its Viewer.

    viewer: Viewer

    The Viewer that contains this Plugin.

    Methods

    • destroy(): void
    • error(msg: string): void
    • Logs an error message to the JavaScript developer console, prefixed with the ID of this Plugin.

      Parameters

      • msg: string

        The error message

      Returns void

    • fire(event: string, value: any): void
    • Fires an event at this Plugin.

      Parameters

      • event: string

        The event type name

      • value: any

        The event parameters

      Returns void

    • log(msg: string): void
    • Logs a message to the JavaScript developer console, prefixed with the ID of this Plugin.

      Parameters

      • msg: string

        The error message

      Returns void

    • on(event: string, callback: () => void): void
    • Subscribes to an event fired at this Plugin.

      Parameters

      • event: string

        The event

      • callback: () => void

        Callback fired on the event

          • (): void
          • Returns void

      Returns void

    • warn(msg: string): void
    • Logs a warning message to the JavaScript developer console, prefixed with the ID of this Plugin.

      Parameters

      • msg: string

        The error message

      Returns void

    Generated using TypeDoc