fix(rotation): support cycling rotateViewportCCW (#4533)
This commit is contained in:
parent
953f36ab4c
commit
bf587070cc
@ -569,7 +569,7 @@ function commandsModule({
|
|||||||
} else if (viewport.getRotation !== undefined) {
|
} else if (viewport.getRotation !== undefined) {
|
||||||
const presentation = viewport.getViewPresentation();
|
const presentation = viewport.getViewPresentation();
|
||||||
const { rotation: currentRotation } = presentation;
|
const { rotation: currentRotation } = presentation;
|
||||||
const newRotation = (currentRotation + rotation) % 360;
|
const newRotation = (currentRotation + rotation + 360) % 360;
|
||||||
viewport.setViewPresentation({ rotation: newRotation });
|
viewport.setViewPresentation({ rotation: newRotation });
|
||||||
viewport.render();
|
viewport.render();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user