UNPKG

@mescius/dsimageviewer

Version:

Document Solutions Image Viewer

17 lines (16 loc) 897 B
import { IEventBus } from "../Models/IImageViewer"; export declare type EventBusAttachOptions = { external?: boolean; once?: boolean; }; export declare type EventBusEventName = "before-open" | "after-open" | "before-close" | "after-close" | "zoom-changed" | "frame-index-changed" | "animation-started" | "animation-stopped" | "keydown" | "keyup"; export declare class EventBus implements IEventBus { private _listeners; constructor(); on(eventName: EventBusEventName, listener: any, options?: EventBusAttachOptions): void; off(eventName: EventBusEventName, listener: any): void; offAll(eventName: EventBusEventName): void; dispatch(eventName: EventBusEventName, data: any): void; _on(eventName: EventBusEventName, listener: any, options?: EventBusAttachOptions): void; _off(eventName: EventBusEventName, listener: Function | false): void; }