The SubscriberController is responsible for all listeners which can influence the application-state from outside.
Callbacks inside this controller can be set by window.SDK.subscriber.{method-name}
Listener on the playback state of the animation, it contains the current time of the playback (in milliseconds) and a flag that describes if the animation is currently playing
Parameters
animationPlaybackState: string
Stringified array of AnimationPlaybackType
Returns void
onAsyncError
onAsyncError(asyncError: string): void
Listener on async errors.
Async errors are thrown at times not directly tied to SDK calls.
e.g. Getting an action error triggered after a late event.
If this is an ActionAsyncError:
id refers to the action id
event refers to the event that triggered the action
eventChain refers the chain of events that lead to the action, first
item being the closest parent.
Listener on character styles, if this changes, this listener will get triggered with the updates
Parameters
characterStyles: string
Stringified object of character styles
Returns void
onColorsChanged
onColorsChanged(colors: string): void
Listener on the state of the currently selected color's styles, if this changes, this listener will get triggered with the updates
Parameters
colors: string
Stringified object of colors
Returns void
onConnectorEvent
onConnectorEvent(connectorEvent: string): void
Listener on connector events, this listener will get triggered when a connector emits one of those events
reloadRequired
authChanged
unloaded
stateChanged
stateChanged - this event will be triggered by connector states: loading, loaded, running, ready, error
Parameters
connectorEvent: string
Stringified object of ConnectorEvent
Returns void
onCropActiveFrameIdChanged
onCropActiveFrameIdChanged(id?: string): void
Listener of editor entering / exiting the crop mode
Parameters
Optional id: string
frame id when entering / null when exiting
Returns void
onDocumentLoaded
onDocumentLoaded(): void
A listener on when the document is fully loaded.
Returns void
onFontsChanged
onFontsChanged(fonts: string): void
Listener on fonts, if this changes, this listener will get triggered with the updates
Parameters
fonts: string
Stringified object of fonts
Returns void
onLayoutsChanged
onLayoutsChanged(layouts: string): void
Listener on layouts, this listener will get triggered when a (sub)layout is
created
removed
renamed
duplicated
Parameters
layouts: string
Stringified object of layouts
Returns void
onPageSelectionChanged
onPageSelectionChanged(): void
To be implemented, gets triggered when clicking on the pageTitle on the canvas.
Returns void
onPageSizeChanged
onPageSizeChanged(pageSize: string): void
Listener on page size, this listener will get triggered when the page size is changed, while the document is a project.
This will not emit anything if your document is a template.
The SubscriberController is responsible for all listeners which can influence the application-state from outside. Callbacks inside this controller can be set by
window.SDK.subscriber.{method-name}