Added World to the API. Can be used to check world dimensions and offsets. Cleaned up and added some comment in Viewer. After removing the reference to a lot of issues arose. The frontend and preview-service seems to use it extensively. Changed the calls referencing the interactions to the ones in the API where it was aplicable, and commented out with a note added for the ones that were not aplicable. We proably need to expose a generic way to manipulate the camera from the API

This commit is contained in:
AlexandruPopovici
2022-08-24 18:24:43 +03:00
parent 25c74556d0
commit 632ad53152
14 changed files with 165 additions and 332 deletions
@@ -52,7 +52,8 @@ v.on('section-box', (status) => {
})
window.viewerScreenshot = function () {
let data = v.interactions.screenshot() // transparent png.
//@Dim: Changed this to use the API
let data = v.screenshot() // transparent png.
let pop = window.open()
pop.document.title = 'super screenshot'
@@ -64,5 +65,6 @@ window.viewerScreenshot = function () {
}
window.zoomFast = function () {
v.interactions.zoomExtents(0.95, false)
//@Dim: This needs to use the API
// v.interactions.zoomExtents(0.95, false)
}