Skip to content

Commit

Permalink
Rename snapchanged to translationsnapchanged and add rotationsnapchan…
Browse files Browse the repository at this point in the history
…ged to be able to configure snapping (#714)
  • Loading branch information
vincentfretin authored May 22, 2024
1 parent 4632f21 commit ddd1895
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit ddd1895

Please sign in to comment.