26 Feb 2019

Viewer does not stay in its container

When putting the Viewer inside a div container which is smaller than the document, then the Viewer spreads outside that container - see above image.

The Viewer is using position: absolute and “An absolute position based on the next non-static element up the control hierarchy. If no relative [or absolute - Adam] elements are defined on the document the position will be document relative - ie. global absolute.”

So you just have to set your container's position to relative or absolute

Viewer staying inside its container

Related Article

Posted By

Adam Nagy

Follow @AdamTheNagy Adam Nagy joined Autodesk back in 2005 and has been providing programming support, consulting, training and evangelism to external developers. He started his career in Budapest, then worked in Prague for 3 years and now lives in South England, UK. At the moment focusing on Inventor and Fusion 360, plus cloud and mobile related technologies. Adam has a degree in Software Engineering and has...