Skip to main content

Class: AViewerPlugin<T, TViewer>

Core-API.AViewerPlugin

Type parameters

NameType
Textends string
TViewerextends IViewerApp = ViewerApp

Hierarchy

Implements

Accessors

dirty

get dirty(): boolean

Returns

boolean

Implementation of

IViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

IViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22

Properties

enabled

Abstract enabled: boolean

Defined in

webgi/src/core/AViewerPlugin.ts:32


_dirty

Protected _dirty: boolean = false

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: TViewer

Defined in

webgi/src/core/AViewerPlugin.ts:29

Methods

onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerTViewer

Returns

Promise<void>

Implementation of

IViewerPlugin.onAdded

Defined in

webgi/src/core/AViewerPlugin.ts:34


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerTViewer

Returns

Promise<void>

Implementation of

IViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:38


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerTViewer

Returns

Promise<void>

Implementation of

IViewerPlugin.onRemove

Defined in

webgi/src/core/AViewerPlugin.ts:42


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Implementation of

IViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


fromJSON

fromJSON(data, meta?): null | AViewerPlugin<T, TViewer> | Promise<null | AViewerPlugin<T, TViewer>>

Parameters

NameType
dataany
meta?any

Returns

null | AViewerPlugin<T, TViewer> | Promise<null | AViewerPlugin<T, TViewer>>

Implementation of

IViewerPlugin.fromJSON

Defined in

webgi/src/core/AViewerPlugin.ts:54


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
typeT | "serialize" | "deserialize"
listener(event: IEvent<T | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.addEventListener

Inherited from

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
typeT | "serialize" | "deserialize"
listener(event: IEvent<T | "serialize" | "deserialize">) => void

Returns

boolean

Implementation of

IViewerPlugin.hasEventListener

Inherited from

SimpleEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
typeT | "serialize" | "deserialize"
listener(event: IEvent<T | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.removeEventListener

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<T | "serialize" | "deserialize">

Returns

void

Implementation of

IViewerPlugin.dispatchEvent

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74

Constructors

constructor

new AViewerPlugin<T, TViewer>()

Type parameters

NameType
Textends string
TViewerextends IViewerApp<TViewer> = ViewerApp

Inherited from

SimpleEventDispatcher.constructor

Defined in

webgi/src/helpers/EventDispatcher.ts:39