fix(rotation): support cycling rotateViewportCCW (#4533)

This commit is contained in:
Bez 2025-01-20 21:13:43 +07:00 committed by GitHub
parent 953f36ab4c
commit bf587070cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -569,7 +569,7 @@ function commandsModule({
} else if (viewport.getRotation !== undefined) {
const presentation = viewport.getViewPresentation();
const { rotation: currentRotation } = presentation;
const newRotation = (currentRotation + rotation) % 360;
const newRotation = (currentRotation + rotation + 360) % 360;
viewport.setViewPresentation({ rotation: newRotation });
viewport.render();
}