diff --git a/Sources/Interaction/Manipulators/CameraManipulator/index.js b/Sources/Interaction/Manipulators/CameraManipulator/index.js index d615a6beab9..6573946ff59 100644 --- a/Sources/Interaction/Manipulators/CameraManipulator/index.js +++ b/Sources/Interaction/Manipulators/CameraManipulator/index.js @@ -34,6 +34,7 @@ const DEFAULT_VALUES = { button: 1, shift: false, control: false, + alt: false, center: [0, 0, 0], rotationFactor: 1, @@ -54,6 +55,7 @@ export function extend(publicAPI, model, initialValues = {}) { 'button', 'shift', 'control', + 'alt', 'rotationFactor', ]); diff --git a/Sources/Interaction/Style/InteractorStyleManipulator/index.js b/Sources/Interaction/Style/InteractorStyleManipulator/index.js index ef5f6036241..430cc90140d 100644 --- a/Sources/Interaction/Style/InteractorStyleManipulator/index.js +++ b/Sources/Interaction/Style/InteractorStyleManipulator/index.js @@ -142,28 +142,28 @@ function vtkInteractorStyleManipulator(publicAPI, model) { //------------------------------------------------------------------------- publicAPI.handleLeftButtonPress = () => { - publicAPI.onButtonDown(1, model.interactor.getShiftKey(), model.interactor.getControlKey()); + publicAPI.onButtonDown(1, model.interactor.getShiftKey(), model.interactor.getControlKey(), model.interactor.getAltKey()); }; //------------------------------------------------------------------------- publicAPI.handleMiddleButtonPress = () => { - publicAPI.onButtonDown(2, model.interactor.getShiftKey(), model.interactor.getControlKey()); + publicAPI.onButtonDown(2, model.interactor.getShiftKey(), model.interactor.getControlKey(), model.interactor.getAltKey()); }; //------------------------------------------------------------------------- publicAPI.handleRightButtonPress = () => { - publicAPI.onButtonDown(3, model.interactor.getShiftKey(), model.interactor.getControlKey()); + publicAPI.onButtonDown(3, model.interactor.getShiftKey(), model.interactor.getControlKey(), model.interactor.getAltKey()); }; //------------------------------------------------------------------------- - publicAPI.onButtonDown = (button, shift, control) => { + publicAPI.onButtonDown = (button, shift, control, alt) => { // Must not be processing an interaction to start another. if (model.currentManipulator) { return; } // Look for a matching camera interactor. - model.currentManipulator = publicAPI.findManipulator(button, shift, control); + model.currentManipulator = publicAPI.findManipulator(button, shift, control, alt); if (model.currentManipulator) { publicAPI.invokeStartInteractionEvent({ type: 'StartInteractionEvent' }); model.currentManipulator.setCenter(model.centerOfRotation); @@ -177,14 +177,15 @@ function vtkInteractorStyleManipulator(publicAPI, model) { }; //------------------------------------------------------------------------- - publicAPI.findManipulator = (button, shift, control) => { + publicAPI.findManipulator = (button, shift, control, alt) => { // Look for a matching camera manipulator let manipulator = null; model.cameraManipulators.forEach((manip) => { if (manip && manip.getButton() === button && manip.getShift() === shift - && manip.getControl() === control) { + && manip.getControl() === control + && manip.getAlt() === alt) { manipulator = manip; } });