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.
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 view.
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 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 ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed and getInfiniteObjectType) will log a message with LL_UsingDisposedObject.
Triggers (an) annotation view retrieval request(s).
An event AnnotationFetchReady is fired when the fetch procedure is finished, then getLastError() tells if the retrieval was correctly performed.
Returns true if the annotation views 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 views from the last call to the fetchAnnotationViews function.
An array of AnnotationResultInterface is returned if the AnnotationGetterInterface has finished computing. Use addEventListener on the event AnnotationFetchReady to know when the AnnotationGetterInterface is ready.
The result is of the size of the array of AnnotationViewInfoInterface that was used in the fetchAnnotationViews 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.
Each call to fetchAnnotationViews is assigned a request id.
This call tels the id of the last call to fetchAnnotationViews.
The id of the last call to fetchAnnotationViews.
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 preforming 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 fetchAnnotationViews.
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.
true if the callback was removed else false.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
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.
true if the callback was removed else false.
The listener function that gets removed.
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 the DMU.
Please see Annotations for more explanations about annotations.
The AnnotationGetterInterface interfaces are created through the createAnnotationGetter method.
The list of signals the AnnotationGetterInterface may trigger is available in the AnnotationGetterInterfaceSignal enumeration.
The annotation retrieval request is triggered through the fetchAnnotationViews method. The result is not available right away, but the event AnnotationFetchReady is triggered when the result of the AnnotationGetterInterface is available. The result is available through the getAnnotationViewsResult function.
As said in Annotations, the annotation views 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 getAnnotationViewsResult 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 AnnotationFetchCancelled signal is fired, and shortly after, AnnotationFetchReady signal is fired, but getAnnotationViewsResult will return undefined. Just call fetchAnnotationViews with another (or the same) AnnotationViewInfoInterface to trigger a new fetch request.
If you call multiple times fetchAnnotationViews before receiving the AnnotationFetchReady, only one AnnotationFetchReady will be sent with the content of the last call to fetchAnnotationViews.
The process is as follows :
Or with async calls :
Please make sure the destination browser supports promises before using async calls.
See