Viewport
The Viewport category in the @bentley/ui-components
package includes
classes and components for working with a Viewport.
Component and Properties
The ViewportComponent React component is wrapper for a ScreenViewport. The ViewportProps interface defines the properties for the ViewportComponent.
The imodel
prop is required and specifies the IModelConnection to display.
Either the viewDefinitionId
prop or the viewState
prop is required to specify a starting view point.
The viewDefinitionId
is the Id of a default view definition to load.
The viewState
is the ViewState to use as a starting point.
The viewportRef
specifies a function that receives the ScreenViewport created by the component and
allows the component user a chance to save it. When using @bentley/ui-framework
and
Frontstages, setting ViewportContentControl.viewport
notifies the FrontstageManager that the
content view is ready.
Sample using Presentation Rules
Simple Viewport Component
This React component utilizes the ViewportComponent component and viewWithUnifiedSelection HOC to create a HOC viewport component that supports unified selection.
Using the SimpleViewportComponent component
API Reference
Last Updated: 11 June, 2024