From 2777becc2b93abcaa160b99817891d74d2719bc0 Mon Sep 17 00:00:00 2001 From: Daniel Mecke Date: Tue, 19 May 2020 23:46:48 +0200 Subject: [PATCH] fixed camera when switching between view modes fixes #345 --- modules/ui/3d.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/3d.js b/modules/ui/3d.js index 7be665921..bd88decc5 100644 --- a/modules/ui/3d.js +++ b/modules/ui/3d.js @@ -322,7 +322,7 @@ function loadTHREE() { } function OrbitControls(camera, domElement) { - if (THREE.OrbitControls) new THREE.OrbitControls(camera, domElement); + if (THREE.OrbitControls) return new THREE.OrbitControls(camera, domElement); return new Promise(resolve => { const script = document.createElement('script');