[]
The image viewer event bus.
Use the event bus to listen and receive certain specific "events". Available events are: "before-open", "after-open", "before-close", "after-close", "zoom-changed", "frame-index-changed", "animation-started", "animation-stopped".
// Liisten frame index changes:
viewer.eventBus.on("frame-index-changed", function(args) { console.log("Image frame changed", args); });
// Listen "after-open" event once:
viewer.eventBus.on("after-open", function(args) { console.log("Image opened", args); }, { once: true });
dispatch(eventName, data): any;
Use the dispatch method to raise an event.
any
any
off(eventName, listener): any;
Remove event listener specified by the listener argument for the event specified by the eventName argument.
any
any
on(
eventName,
listener,
options?): any;
Listen eventbus event.
any
any