The Native Viewport control (sap.ui.vk.NativeViewport) provides a rendering canvas for 2D images loaded into the Viewer application.
The Native Viewport control (sap.ui.vk.NativeViewport) loads files supported natively by the browser into a viewing area using standard HTML and CSS. Viewing of the loaded images is enhanced with standard VIT pan and zoom gesture support.
The sap.ui.vk.NativeViewport control can occupy all or part of the user interface.
Loading Images into the Native Viewport
The NativeViewport control supports the loading of images that are natively supported by the browser.
You must specify the extension of the file you want to load. Otherwise, the file will not load.
If it can be detected, a console message will be displayed when a problem occurs during file loading.
Gesture Handling in the Native Viewport
Gestures such as pan and zoom are captured and processed by the sap.ui.vk.Loco library. A new NativeViewport instance is initialized with an instance of the sap.ui.vk.Loco library attached, so that gestures can be captured and processed.
Keyboard Shortcuts in the Native Viewport
In addition to mouse and touch gestures, keyboard shortcuts are available for navigating around the NativeViewport instance:
|DIRECTIONAL ARROW||Pan the image.|
|+||Zoom into the image.|
|-||Zoom out of the image.|