Provides a rendering canvas for the 3D elements of a loaded scene.
Constructor for a new Viewport.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.vk.ViewportBase(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new Viewport control. Generated automatically if no ID is given. |
|
mSettings? | object | Initial settings for the new Viewport control. |
Name | Type | Default Value | Description |
---|---|---|---|
backgroundColorBottom | sap.ui.core.CSSColor | rgba(255, 255, 255, 1) | Viewport background bottom color in the CSS Color format Visibility: public |
backgroundColorTop | sap.ui.core.CSSColor | rgba(50, 50, 50, 1) | Viewport background top color in the CSS Color format Visibility: public |
disableHotspotHovering | boolean | false | Disables hotspot hovering Visibility: public |
freezeCamera | boolean | false | Freeze camera Visibility: public |
height | sap.ui.core.CSSSize | 100% | Viewport height Visibility: public |
hotspotColor | sap.ui.core.CSSColor | rgba(89, 0, 0, 0.73) | Color used for highlighting hotspots in the CSS Color format Visibility: public |
hotspotColorABGR | int | 1493172411 | Color used for highlighting hotspots in the ABGR format Visibility: public |
keepOutputSize | boolean | false | Visibility: public |
renderMode | sap.ui.vk.RenderMode | Default | Viewport render mode Visibility: public |
selectionDisplayMode | sap.ui.vk.SelectionDisplayMode | Highlight | Selection display mode Visibility: public |
selectionMode | sap.ui.vk.SelectionMode | Sticky | Selection mode Visibility: public |
showAllHotspots | boolean | false | Enables or disables showing of all hotspots Visibility: public |
showAllHotspotsTintColor | sap.ui.core.CSSColor | rgba(255, 255, 0, .35) | Color used to highlight all hotspots when the showAllHotspots property has a value of true. Visibility: public |
showDebugInfo | boolean | false | Shows or hides the debug info. Visibility: public |
showSafeArea | boolean | false | Shows or hides the Safe Area Visibility: public |
showSelectionBoundingBoxes | boolean | true | Show selection bounding boxes Visibility: public |
width | sap.ui.core.CSSSize | 100% | Viewport width Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
annotations | 0..n | sap.ui.vk.Annotation |
HTML Annotations present in the active view |
content | 0..n | sap.ui.core.Control |
The controls inside the viewport. |
outputSettings | 0..1 | sap.ui.vk.OutputSettings |
Output size settings of the viewport |
safeArea | 0..1 | sap.ui.vk.SafeArea |
SafeArea control for viewport |
Name | Cardinality | Type | Description |
---|---|---|---|
contentConnector | 0..1 | sap.ui.vk.ContentConnector |
An association to the |
tools | 0..n | sap.ui.vk.tools.Tool |
The tools of this viewport. |
viewStateManager | 0..1 | sap.ui.vk.ViewStateManagerBase |
An association to the |
Event | Description |
---|---|
nodeClicked |
This event will be fired when a node is clicked. This event bubbles up the control hierarchy. |
nodesPicked |
This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to This event bubbles up the control hierarchy. |
nodeZoomed |
This event is fired when a node in the scene is zoomed in/out by double-clicking. This event bubbles up the control hierarchy. |
procedureFinished |
This event is fired when the current procedure is done playing This event bubbles up the control hierarchy. |
resize |
This event is fired when viewport size is changed. This event bubbles up the control hierarchy. |
urlClicked |
This event is fired when a URL in a note is clicked. This event bubbles up the control hierarchy. |
viewActivated |
This event is fired when a view in the viewport is activated This event bubbles up the control hierarchy. |
viewFinished |
This event is fired when the current view is done playing This event bubbles up the control hierarchy. |
This event will be fired when a node is clicked.
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
nodeRef | any |
Returns a node reference. |
x | int | |
y | int |
This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None
Application can modify list of picked node references to alter selection behaviour.
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
picked | any[] |
References of the nodes that are picked. |
This event is fired when a node in the scene is zoomed in/out by double-clicking.
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
zoomed | any |
Reference of the node that is zoomed. |
isZoomIn | boolean |
True for zoom in, and false for zoom out. |
This event is fired when the current procedure is done playing
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
This event is fired when viewport size is changed.
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
size | object |
Returns the width and height of new size |
This event is fired when a URL in a note is clicked.
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
nodeRef | any |
Returns a node reference of the note that contains the URL. |
url | string |
Returns a URL that was clicked. |
This event is fired when a view in the viewport is activated
This event bubbles up the control hierarchy.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
viewIndex | int |
Index of the activated view |
view | sap.ui.vk.View |
The activated view |
type | string |
The type of content loaded into the Viewport (for example: 2D, 3D). |
Method | Description |
---|---|
_setContent |
Sets a scene obtained as content from the associated content connector. This method should be overridden in derived classes. |
activateView |
Calls activateView with view definition |
addAnnotation |
Adds some annotation to the aggregation annotations. |
addContent |
Adds some content to the aggregation content. |
addTool |
Adds some tool into the association tools. |
attachNodeClicked |
Attaches event handler When called, the context of the event handler (its This event will be fired when a node is clicked. |
attachNodesPicked |
Attaches event handler When called, the context of the event handler (its This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to |
attachNodeZoomed |
Attaches event handler When called, the context of the event handler (its This event is fired when a node in the scene is zoomed in/out by double-clicking. |
attachProcedureFinished |
Attaches event handler When called, the context of the event handler (its This event is fired when the current procedure is done playing |
attachResize |
Attaches event handler When called, the context of the event handler (its This event is fired when viewport size is changed. |
attachUrlClicked |
Attaches event handler When called, the context of the event handler (its This event is fired when a URL in a note is clicked. |
attachViewActivated |
Attaches event handler When called, the context of the event handler (its This event is fired when a view in the viewport is activated |
attachViewFinished |
Attaches event handler When called, the context of the event handler (its This event is fired when the current view is done playing |
destroyAnnotations |
Destroys all the annotations in the aggregation annotations. |
destroyContent |
Destroys all the content in the aggregation content. |
destroyOutputSettings |
Destroys the outputSettings in the aggregation outputSettings. |
destroySafeArea |
Destroys the safeArea in the aggregation safeArea. |
detachNodeClicked |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachNodesPicked |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachNodeZoomed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachProcedureFinished |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachResize |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUrlClicked |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachViewActivated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachViewFinished |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
exclusiveSelectionHandler |
Helper method used to provide exclusive selection method. If this method is used then nodes are marked as selected while all previously selected objects are deselected. If this is called with empty nodes list then all already selected nodes are deselected. |
sap.ui.vk.ViewportBase.extend |
Creates a new subclass of class sap.ui.vk.ViewportBase with name
|
fireNodeClicked |
Fires event nodeClicked to attached listeners. |
fireNodesPicked |
Fires event nodesPicked to attached listeners. |
fireNodeZoomed |
Fires event nodeZoomed to attached listeners. |
fireProcedureFinished |
Fires event procedureFinished to attached listeners. |
fireResize |
Fires event resize to attached listeners. |
fireUrlClicked |
Fires event urlClicked to attached listeners. |
fireViewActivated |
Fires event viewActivated to attached listeners. |
fireViewFinished |
Fires event viewFinished to attached listeners. |
getAnnotations |
Gets content of aggregation annotations. HTML Annotations present in the active view |
getBackgroundColorBottom |
Gets current value of property backgroundColorBottom. Viewport background bottom color in the CSS Color format Default value is |
getBackgroundColorTop |
Gets current value of property backgroundColorTop. Viewport background top color in the CSS Color format Default value is |
getCamera |
Gets current camera to the viewport |
getContent |
Gets content of aggregation content. The controls inside the viewport. |
getContentConnector |
ID of the element which is the current target of the association contentConnector, or |
getDisableHotspotHovering |
Gets current value of property disableHotspotHovering. Disables hotspot hovering Default value is |
getFreezeCamera |
Gets current value of property freezeCamera. Freeze camera Default value is |
getHeight |
Gets current value of property height. Viewport height Default value is |
getHotspotColor |
Gets current value of property hotspotColor. Color used for highlighting hotspots in the CSS Color format Default value is |
getHotspotColorABGR |
Gets current value of property hotspotColorABGR. Color used for highlighting hotspots in the ABGR format Default value is |
getKeepOutputSize |
Gets current value of property keepOutputSize. Default value is |
sap.ui.vk.ViewportBase.getMetadata |
Returns a metadata object for class sap.ui.vk.ViewportBase. |
getOutputSettings |
Gets content of aggregation outputSettings. Output size settings of the viewport |
getRenderMode |
Gets current value of property renderMode. Viewport render mode Default value is |
getSafeArea |
Gets content of aggregation safeArea. SafeArea control for viewport |
getSelectionDisplayMode |
Gets current value of property selectionDisplayMode. Selection display mode Default value is |
getSelectionMode |
Gets current value of property selectionMode. Selection mode Default value is |
getShowAllHotspots |
Gets current value of property showAllHotspots. Enables or disables showing of all hotspots Default value is |
getShowAllHotspotsTintColor |
Gets current value of property showAllHotspotsTintColor. Color used to highlight all hotspots when the showAllHotspots property has a value of true. Default value is |
getShowDebugInfo |
Gets current value of property showDebugInfo. Shows or hides the debug info. Default value is |
getShowSafeArea |
Gets current value of property showSafeArea. Shows or hides the Safe Area Default value is |
getShowSelectionBoundingBoxes |
Gets current value of property showSelectionBoundingBoxes. Show selection bounding boxes Default value is |
getTools |
Returns array of IDs of the elements which are the current targets of the association tools. |
getViewStateManager |
ID of the element which is the current target of the association viewStateManager, or |
getWidth |
Gets current value of property width. Viewport width Default value is |
indexOfAnnotation |
Checks for the provided |
indexOfContent |
Checks for the provided |
insertAnnotation |
Inserts a annotation into the aggregation annotations. |
insertContent |
Inserts a content into the aggregation content. |
pan |
Performs a |
removeAllAnnotations |
Removes all the controls from the aggregation annotations. Additionally, it unregisters them from the hosting UIArea. |
removeAllContent |
Removes all the controls from the aggregation content. Additionally, it unregisters them from the hosting UIArea. |
removeAllTools |
Removes all the controls in the association named tools. |
removeAnnotation |
Removes a annotation from the aggregation annotations. |
removeContent |
Removes a content from the aggregation content. |
removeTool |
Removes an tool from the association named tools. |
renderContent |
Renders viewport content. |
renderTools |
Renders viewport tools. |
rotate |
Rotates the content resource displayed on the Viewport. |
setBackgroundColorBottom |
Sets a new value for property backgroundColorBottom. Viewport background bottom color in the CSS Color format When called with a value of Default value is |
setBackgroundColorTop |
Sets a new value for property backgroundColorTop. Viewport background top color in the CSS Color format When called with a value of Default value is |
setCamera |
Sets current camera to the viewport |
setContentConnector |
Sets the associated contentConnector. |
setDisableHotspotHovering |
Sets a new value for property disableHotspotHovering. Disables hotspot hovering When called with a value of Default value is |
setFreezeCamera |
Sets a new value for property freezeCamera. Freeze camera When called with a value of Default value is |
setHeight |
Sets a new value for property height. Viewport height When called with a value of Default value is |
setHotspotColor |
Sets a new value for property hotspotColor. Color used for highlighting hotspots in the CSS Color format When called with a value of Default value is |
setHotspotColorABGR |
Sets a new value for property hotspotColorABGR. Color used for highlighting hotspots in the ABGR format When called with a value of Default value is |
setKeepOutputSize |
Sets a new value for property keepOutputSize. When called with a value of Default value is |
setOutputSettings |
Sets the aggregated outputSettings. |
setRenderMode |
Sets a new value for property renderMode. Viewport render mode When called with a value of Default value is |
setSafeArea |
Sets the aggregated safeArea. |
setSelectionDisplayMode |
Sets a new value for property selectionDisplayMode. Selection display mode When called with a value of Default value is |
setSelectionMode |
Sets a new value for property selectionMode. Selection mode When called with a value of Default value is |
setShowAllHotspots |
Sets a new value for property showAllHotspots. Enables or disables showing of all hotspots When called with a value of Default value is |
setShowAllHotspotsTintColor |
Sets a new value for property showAllHotspotsTintColor. Color used to highlight all hotspots when the showAllHotspots property has a value of true. When called with a value of Default value is |
setShowDebugInfo |
Sets a new value for property showDebugInfo. Shows or hides the debug info. When called with a value of Default value is |
setShowSafeArea |
Sets a new value for property showSafeArea. Shows or hides the Safe Area When called with a value of Default value is |
setShowSelectionBoundingBoxes |
Sets a new value for property showSelectionBoundingBoxes. Show selection bounding boxes When called with a value of Default value is |
setViewStateManager |
Sets the associated viewStateManager. |
setWidth |
Sets a new value for property width. Viewport width When called with a value of Default value is |
stickySelectionHandler |
Helper method to provide "sticky" selection method. If this method is used then nodes are added into selection if they were not selected before, otherwise they are removed from selection. If this is called with empty nodes list then all already selected nodes are deselected. |
zoom |
Performs a |
Sets a scene obtained as content from the associated content connector.
This method should be overridden in derived classes.
Param | Type | DefaultValue | Description |
---|---|---|---|
content | sap.ui.vk.Scene |
New content or |
Calls activateView with view definition
Param | Type | DefaultValue | Description |
---|---|---|---|
view | sap.ui.vk.View |
view object definition |
|
playViewGroup | boolean |
true if view activation is part of playing view group |
|
notAnimateCameraChange | boolean |
true if not animating the change of camera |
Adds some annotation to the aggregation annotations.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAnnotation | sap.ui.vk.Annotation |
The annotation to add; if empty, nothing is inserted |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to add; if empty, nothing is inserted |
Adds some tool into the association tools.
Param | Type | DefaultValue | Description |
---|---|---|---|
vTool | sap.ui.core.ID sap.ui.vk.tools.Tool |
The tools to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the nodeClicked event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event will be fired when a node is clicked.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the nodesPicked event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when nodes in the scene are picked by user action. If application requires different selection behaviour then it can handle this event and implement its own selection method. In this case selectionMode property should be set to sap.ui.vk.SelectionMode.None
Application can modify list of picked node references to alter selection behaviour.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the nodeZoomed event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when a node in the scene is zoomed in/out by double-clicking.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the procedureFinished event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when the current procedure is done playing
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the resize event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when viewport size is changed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the urlClicked event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when a URL in a note is clicked.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the viewActivated event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when a view in the viewport is activated
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the viewFinished event of this sap.ui.vk.ViewportBase
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.vk.ViewportBase
itself.
This event is fired when the current view is done playing
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the nodeClicked event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the nodesPicked event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the nodeZoomed event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the procedureFinished event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the resize event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the urlClicked event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the viewActivated event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the viewFinished event of this sap.ui.vk.ViewportBase
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Helper method used to provide exclusive selection method. If this method is used then nodes are marked as selected while all previously selected objects are deselected. If this is called with empty nodes list then all already selected nodes are deselected.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodes | any[] |
Array of node references |
Creates a new subclass of class sap.ui.vk.ViewportBase with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event nodeClicked to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
nodeRef | any |
Returns a node reference. |
|
x | int | ||
y | int |
Fires event nodesPicked to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
picked | any[] |
References of the nodes that are picked. |
Fires event nodeZoomed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
zoomed | any |
Reference of the node that is zoomed. |
|
isZoomIn | boolean |
True for zoom in, and false for zoom out. |
Fires event procedureFinished to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event resize to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
size | object |
Returns the width and height of new size |
Fires event urlClicked to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
nodeRef | any |
Returns a node reference of the note that contains the URL. |
|
url | string |
Returns a URL that was clicked. |
Fires event viewActivated to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewIndex | int |
Index of the activated view |
|
view | sap.ui.vk.View |
The activated view |
|
type | string |
The type of content loaded into the Viewport (for example: 2D, 3D). |
Fires event viewFinished to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
viewIndex | int |
Gets current value of property backgroundColorBottom.
Viewport background bottom color in the CSS Color format
Default value is "rgba(255, 255, 255, 1)"
.
Gets current value of property backgroundColorTop.
Viewport background top color in the CSS Color format
Default value is "rgba(50, 50, 50, 1)"
.
ID of the element which is the current target of the association contentConnector, or null
.
Gets current value of property disableHotspotHovering.
Disables hotspot hovering
Default value is false
.
Gets current value of property hotspotColor.
Color used for highlighting hotspots in the CSS Color format
Default value is "rgba(89, 0, 0, 0.73)"
.
Gets current value of property hotspotColorABGR.
Color used for highlighting hotspots in the ABGR format
Default value is 0x590000BB
.
Gets current value of property renderMode.
Viewport render mode
Default value is Default
.
Gets current value of property selectionDisplayMode.
Selection display mode
Default value is Highlight
.
Gets current value of property selectionMode.
Selection mode
Default value is Sticky
.
Gets current value of property showAllHotspots.
Enables or disables showing of all hotspots
Default value is false
.
Gets current value of property showAllHotspotsTintColor.
Color used to highlight all hotspots when the showAllHotspots property has a value of true.
Default value is "rgba(255, 255, 0, .35)"
.
Gets current value of property showDebugInfo.
Shows or hides the debug info.
Default value is false
.
Gets current value of property showSafeArea.
Shows or hides the Safe Area
Default value is false
.
Gets current value of property showSelectionBoundingBoxes.
Show selection bounding boxes
Default value is true
.
Returns array of IDs of the elements which are the current targets of the association tools.
ID of the element which is the current target of the association viewStateManager, or null
.
Checks for the provided sap.ui.vk.Annotation
in the aggregation annotations. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAnnotation | sap.ui.vk.Annotation |
The annotation whose index is looked for |
Checks for the provided sap.ui.core.Control
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content whose index is looked for |
Inserts a annotation into the aggregation annotations.
Param | Type | DefaultValue | Description |
---|---|---|---|
oAnnotation | sap.ui.vk.Annotation |
The annotation to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Performs a pan
gesture to pan across the Viewport.
Param | Type | DefaultValue | Description |
---|---|---|---|
dx | int |
The change in distance along the x-coordinate. |
|
dy | int |
The change in distance along the y-coordinate. |
Removes all the controls from the aggregation annotations.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes a annotation from the aggregation annotations.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAnnotation | int string sap.ui.vk.Annotation |
The annotation to remove or its index or id |
Removes a content from the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
vContent | int string sap.ui.core.Control |
The content to remove or its index or id |
Removes an tool from the association named tools.
Param | Type | DefaultValue | Description |
---|---|---|---|
vTool | int sap.ui.core.ID sap.ui.vk.tools.Tool |
The tool to be removed or its index or ID |
Renders viewport content.
Param | Type | DefaultValue | Description |
---|---|---|---|
rm | sap.ui.core.RenderManager |
the RenderManager that can be used for writing to the Render-Output-Buffer |
Renders viewport tools.
Param | Type | DefaultValue | Description |
---|---|---|---|
rm | sap.ui.core.RenderManager |
the RenderManager that can be used for writing to the Render-Output-Buffer |
Rotates the content resource displayed on the Viewport.
Param | Type | DefaultValue | Description |
---|---|---|---|
dx | int |
The change in x-coordinate used to define the desired rotation. |
|
dy | int |
The change in y-coordinate used to define the desired rotation. |
Sets a new value for property backgroundColorBottom.
Viewport background bottom color in the CSS Color format
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(255, 255, 255, 1)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sBackgroundColorBottom | sap.ui.core.CSSColor | "rgba(255, 255, 255, 1)" |
New value for property |
Sets a new value for property backgroundColorTop.
Viewport background top color in the CSS Color format
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(50, 50, 50, 1)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sBackgroundColorTop | sap.ui.core.CSSColor | "rgba(50, 50, 50, 1)" |
New value for property |
Sets current camera to the viewport
Param | Type | DefaultValue | Description |
---|---|---|---|
camera | sap.ui.vk.Camera |
If the |
Sets the associated contentConnector.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContentConnector | sap.ui.core.ID sap.ui.vk.ContentConnector |
ID of an element which becomes the new target of this contentConnector association; alternatively, an element instance may be given |
Sets a new value for property disableHotspotHovering.
Disables hotspot hovering
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bDisableHotspotHovering | boolean | false |
New value for property |
Sets a new value for property freezeCamera.
Freeze camera
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bFreezeCamera | boolean | false |
New value for property |
Sets a new value for property height.
Viewport height
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "100%"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeight | sap.ui.core.CSSSize | "100%" |
New value for property |
Sets a new value for property hotspotColor.
Color used for highlighting hotspots in the CSS Color format
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(89, 0, 0, 0.73)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHotspotColor | sap.ui.core.CSSColor | "rgba(89, 0, 0, 0.73)" |
New value for property |
Sets a new value for property hotspotColorABGR.
Color used for highlighting hotspots in the ABGR format
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0x590000BB
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iHotspotColorABGR | int | 0x590000BB |
New value for property |
Sets a new value for property keepOutputSize.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bKeepOutputSize | boolean | false |
New value for property |
Sets the aggregated outputSettings.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOutputSettings | sap.ui.vk.OutputSettings |
The outputSettings to set |
Sets a new value for property renderMode.
Viewport render mode
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Default
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sRenderMode | sap.ui.vk.RenderMode | Default |
New value for property |
Sets the aggregated safeArea.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSafeArea | sap.ui.vk.SafeArea |
The safeArea to set |
Sets a new value for property selectionDisplayMode.
Selection display mode
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Highlight
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSelectionDisplayMode | sap.ui.vk.SelectionDisplayMode | Highlight |
New value for property |
Sets a new value for property selectionMode.
Selection mode
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Sticky
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSelectionMode | sap.ui.vk.SelectionMode | Sticky |
New value for property |
Sets a new value for property showAllHotspots.
Enables or disables showing of all hotspots
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowAllHotspots | boolean | false |
New value for property |
Sets a new value for property showAllHotspotsTintColor.
Color used to highlight all hotspots when the showAllHotspots property has a value of true.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(255, 255, 0, .35)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sShowAllHotspotsTintColor | sap.ui.core.CSSColor | "rgba(255, 255, 0, .35)" |
New value for property |
Sets a new value for property showDebugInfo.
Shows or hides the debug info.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowDebugInfo | boolean | false |
New value for property |
Sets a new value for property showSafeArea.
Shows or hides the Safe Area
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowSafeArea | boolean | false |
New value for property |
Sets a new value for property showSelectionBoundingBoxes.
Show selection bounding boxes
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowSelectionBoundingBoxes | boolean | true |
New value for property |
Sets the associated viewStateManager.
Param | Type | DefaultValue | Description |
---|---|---|---|
oViewStateManager | sap.ui.core.ID sap.ui.vk.ViewStateManagerBase |
ID of an element which becomes the new target of this viewStateManager association; alternatively, an element instance may be given |
Sets a new value for property width.
Viewport width
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "100%"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize | "100%" |
New value for property |
Helper method to provide "sticky" selection method. If this method is used then nodes are added into selection if they were not selected before, otherwise they are removed from selection. If this is called with empty nodes list then all already selected nodes are deselected.
Param | Type | DefaultValue | Description |
---|---|---|---|
nodes | any[] |
Array of node references |