Skip to content

Zoom to box size #103

Answered by vagran
ershuaili asked this question in Q&A
Discussion options

You must be logged in to vote

It is intentional padding, used for automatic view when a scene is loaded. You can call FitView() with padding argument set to 0 like here. Something like:

const bounds = viewer.GetBounds()
const origin = viewer.GetOrigin()
viewer.FitView(bounds.minX - origin.x, bound.maxX - origin.x, bounds.minY - origin.Y, bounds.maxY - origin.Y, 0)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ershuaili
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants