Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
It is possible to add an object that will be included in the callback to avoid creating too many closures.
Calling twice addEventListener with the same parameters results in the second call to be ignored,
only unique pairs callback / object are allowed, in order to avoid calling multiple times the same
thing.
The id of the inserted callback (actually an UUID).
Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
The id of the inserted callback (actually an UUID).
Asynchronously gets (an) annotation views group(s).
Returns a promise that will be resolved with the reason, and the eventual result when the fetch request is finished or cancelled.
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the
requested Array
Cancels the computation of the fetch retrieval (if any).
A AnnotationGetterInterfaceSignal.AnnotationFetchCancelled signal is emitted if the AnnotationGetterInterface is retrieving data.
true if the AnnotationGetterInterface was running, else false.
Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the InfiniteObjectDispatcherInterfaceSignal.ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed, getInfiniteObjectType and application id retrieval) will log a message with LogLevel.LL_UsingDisposedObject.
Triggers (an) annotation views groups retrieval request(s).
An event AnnotationGetterInterfaceSignal.AnnotationFetchReady is fired when the fetch procedure is finished, then getLastError() tells if the retrieval was correctly performed.
Returns true if the annotation groups fetch procedure is started. If not, just call getLastError to get the reason why the procedure failed.
true if the AnnotationGetterInterface has begun running.
Gets the list of all annotation groups from the last call to the fetchAnnotationGroups function.
An array of AnnotationResultInterface is returned if the AnnotationGetterInterface has finished computing. Use addEventListener on the event AnnotationGetterInterfaceSignal.AnnotationFetchReady to know when the AnnotationGetterInterface is ready.
The result is of the size of the array of AnnotationGroupInfoInterface that was used in the fetchAnnotationGroups call.
DO NOT modify this data in place, this results in undefined behavior.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the annotation retrieval procedure.
The last error.
Each call to fetchAnnotationGroups is assigned a request id.
This call tels the id of the last call to fetchAnnotationGroups.
The id of the last call to fetchAnnotationGroups.
Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Tells if a annotation retrieval procedure has been cancelled.
This is generally the case after calling cancelFetch when the AnnotationGetterInterface is performing an annotation retrieval procedure.
true if the annotation retrieval procedure is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if a annotation retrieval procedure is running.
This is the case after calling fetchAnnotationGroups.
true if an annotation retrieval procedure request is running.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
true if the callback was removed else false.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
true if the callback was removed else false.
Removes a listener by its id.
If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.
true if the callback was removed else false.
The AnnotationGetterInterface interface is used to fetch annotations views in groups in the DMU.
Please see Annotations for more explanations about annotations.
The AnnotationGetterInterface interfaces are created through the DataSessionInterface.createAnnotationGetter method.
The list of signals the AnnotationGetterInterface may trigger is available in the AnnotationGetterInterfaceSignal enumeration.
The annotation retrieval request is triggered through the fetchAnnotationGroups method. The result is not available right away, but the event AnnotationGetterInterfaceSignal.AnnotationFetchReady is triggered when the result of the AnnotationGetterInterface is available. The result is available through the getAnnotationGroupsResult function.
As said in Annotations, the annotation groups result consists in opaque annotation view(s) that must be included in an AnnotationRendererInterface to be usable. Each annotation view is itself composed of multiple annotations.
Warning : there may be cases when the getAnnotationGroupsResult is not available such as when the AnnotationGetterInterface is fetching data, i.e. when isRunning returns true, or when the AnnotationGetterInterface has been cancelled, i.e. when isCancelled returns true.
An AnnotationGetterInterface may be interrupted (cancelled) when the AnnotationGetterInterface is running and cancelFetch is called. In such cases, the AnnotationGetterInterfaceSignal.AnnotationFetchCancelled signal is fired, and shortly after, AnnotationGetterInterfaceSignal.AnnotationFetchReady signal is fired, but getAnnotationGroupsResult will return undefined. Just call fetchAnnotationGroups with another (or the same) AnnotationGroupInfoInterface to trigger a new fetch request.
If you call multiple times fetchAnnotationGroups before receiving the AnnotationGetterInterfaceSignal.AnnotationFetchReady, only one AnnotationGetterInterfaceSignal.AnnotationFetchReady will be sent with the content of the last call to fetchAnnotationGroups.
The process is as follows :
Or with async calls :
Please make sure the destination browser supports promises before using async calls.
See