From ddd1895d7b344c758ed737ffa8e324c81be56e6e Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Wed, 22 May 2024 15:54:12 +0200 Subject: [PATCH] Rename snapchanged to translationsnapchanged and add rotationsnapchanged to be able to configure snapping (#714) --- src/lib/viewport.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/viewport.js b/src/lib/viewport.js index 384b2599..451b8eb5 100644 --- a/src/lib/viewport.js +++ b/src/lib/viewport.js @@ -134,10 +134,14 @@ export function Viewport(inspector) { transformControls.setMode(mode); }); - Events.on('snapchanged', (dist) => { + Events.on('translationsnapchanged', (dist) => { transformControls.setTranslationSnap(dist); }); + Events.on('rotationsnapchanged', (dist) => { + transformControls.setRotationSnap(dist); + }); + Events.on('transformspacechanged', (space) => { transformControls.setSpace(space); });