setViewport
Sets the viewport of the 2D Viewer.
Example
Usage
const namedViewport = "fit";
const options = {
expandInPercentage: 15
};
viewer2d.setViewport(namedViewport, options);Parameters
namedViewport
Name of the viewport to set, valid value is fit.
Type | Required |
|---|---|
String | Yes |
options
Options for the viewport.
Type | Required |
|---|---|
Object | No |
Properties
Name | Type | Required | Description |
|---|---|---|---|
expandInPercentage | Number | No | Expansion applied to the viewport |