From a3ae96cc62e52c0a5bae63368b6a69f261c15f87 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Sun, 8 Sep 2024 08:59:01 +0200 Subject: [PATCH] Update transformControls scale on camera change (fix #649) (#761) --- src/lib/viewport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/viewport.js b/src/lib/viewport.js index e8334cfb..f0e54cc4 100644 --- a/src/lib/viewport.js +++ b/src/lib/viewport.js @@ -112,6 +112,7 @@ export function Viewport(inspector) { controls.zoomSpeed = 0.05; controls.setAspectRatio(sceneEl.canvas.width / sceneEl.canvas.height); controls.addEventListener('change', () => { + transformControls.update(true); // true is updateScale Events.emit('camerachanged'); }); @@ -177,7 +178,6 @@ export function Viewport(inspector) { Events.on('objectfocus', (object) => { controls.focus(object); - transformControls.update(); }); Events.on('geometrychanged', (object) => {