name of HTML5 element
Initial width of this viewport
Initial height of this viewport
turn off the right-click popup menu
Display the FPS text in the viewport
@ param showFPS Set to true to display frames per seoond in the viewport, false to hide it
By default, JavaScript windows only see mosue events within its Canvas element, which means when the mouse moves outside the element, they are no longer tracked. By enabling this option, mouse events outside the HTML element are passed to this adaptor. By default, this is off (to adhere to standard javaScript behavior). In all cases, when a mouseUp occurs outside the active viewport, that event will be passed to the adaptor.
HTML element associated with this viewport
Get the orientation for this viewport
return the renderEngine associated with this viewport.
return the renderEngineID associated with this viewport
Get the slice information from scroll adaptor for 2D views
Invokes the native intermediate render() method.
This is a synchronous method and returns ReturnCode.ok on success.
Invokes the native renderFinal() method. It is important that a render() be done before a renderFinal() after the rendeirng state has changed, such as from a setRenderParamters().
This is a synchronous method and returns ReturnCode.ok on success.
render the supplied bytes to the HTML element using paint(), and then update the internal state varaibles. If the mouse adaptor has a postRender step, such as during flythrough, invoke its postRender() method after the rendering is complete so the next frames can be requested.
The renderImageData() method is extended in the subclass HTMLRepaintableViewport to create a duplicate copy of the rendered image from the server, so it is possible to update the viewport without forcing a native renderImageData() if the render parameters have not changed.
TODO: extend this to support postRender for the touch flythrough
Applies the specified XML preset to this viewport
path and filename of the XML file to load. This will be relative to the FoviaWebSDK.EXE directory, or can be an absolute path
This is an asynchronous method that returns a Promise as follows:
Promise .then(void) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , void)
While this does not provide a return value, the application will be notified once the preset has been applied and rendered
Associate a custom mouse adaptor with a given mouse button and keyboard modifier
Associate a custom mouse adaptor with a given mouse button and keyboard modifier
Create a mapping between a mouse event and the specified adaptor
Set the orientation for this viewport (typically called when creating MPR viewports)
Install a mouse adaptor that is invokved unconditionally for all mouse events. This allow the application to peek at the event, process it, and stop the propagate.
This is useful when the application is detecting a mouse over event of an annotation or cross-reference lines, and handle that opposed to the current mouse adaptor that would otherwise be triggered.
Install a touch adaptor that is invokved unconditionally for all touch events. This allow the application to peek at the event, process it, and stop the propagate.
This is useful when the application is detecting a touch over event of an annotation or cross-reference lines, and handle that opposed to the current mouse adaptor that would otherwise be triggered.
map between a touch event and specified adaptor
retrieve the current "this" or "self" pointer (HTMLViewport) from the HTML element
store the current this pointer (HTMLViewport) into the HTML element (this reference is visible from the browsser)
Generated using TypeDoc
HTMLDoubleBufferViewport extends base HTMLViewport with a double buffer option. Typically double buffering is not necessary, but if an asynchronous call back into the server is part of the paint pipeline, double buffering may be necessary.