跳到主要内容

flywave-mapview.eventdispatcher

Home > @flywave/flywave-mapview > EventDispatcher

EventDispatcher class​

Signature:

export declare class EventDispatcher 

Properties​

Property

Modifiers

Type

Description

eventTypes

readonly

string[]

Retrieve the registered event types.

Methods​

Method

Modifiers

Description

addEventListener(type, listener)

Add a new event listener to the event type.

dispatchEvent(event)

Dispatch the event to the registered listeners.

dispose()

Destroy this EventDispatcher instance.

Unregister all event handlers used. This is method should be called when you stop using EventDispatcher.

hasEventListener(type, listener)

Checks if listener is added to an event type.

listeners(type)

Retrieve the registered listeners to the specified event.

removeAllEventListeners()

Remove all event listeners for housekeeping.

removeEventListener(type, listener)

Remove the listener from the event type.