Access the core viewer instance from the embedded viewer.

This commit is contained in:
kovacsv 2021-12-20 16:31:26 +01:00
parent 9c3e6fa3ec
commit 18e35701be
2 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,6 @@
let parentDiv = document.getElementById ('viewer');
// initialize the viewer with the parent element and some parameters
// the canvas will be resized according to the size of the parent
let viewer = new OV.EmbeddedViewer (parentDiv, {
camera : new OV.Camera (
new OV.Coord3D (-1.5, -3.0, 2.0),

View File

@ -101,6 +101,11 @@ OV.EmbeddedViewer = class
});
}
GetViewer ()
{
return this.viewer;
}
Resize ()
{
let width = this.parentElement.clientWidth;