Skip to content

Commit

Permalink
Merge pull request #94 from jun-sironamedical/feature/remove-reset-ke…
Browse files Browse the repository at this point in the history
…ybinding

feat(View): added keybindReset prop for optional reset binding
  • Loading branch information
floryst authored Jan 5, 2023
2 parents 0bd5eea + 7591621 commit 5182206
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class View extends Component {
}
switch (e.code) {
case 'KeyR':
this.resetCamera();
if (props.keybindResetCamera) this.resetCamera();
break;
default:
// console.log(e.code);
Expand Down Expand Up @@ -737,6 +737,7 @@ View.defaultProps = {
showCubeAxes: false,
pointerSize: 0,
showOrientationAxes: false,
keybindResetCamera: true,
};

View.propTypes = {
Expand Down Expand Up @@ -905,4 +906,9 @@ View.propTypes = {
* Show/Hide orientation axes.
*/
showOrientationAxes: PropTypes.bool,

/**
* Trigger/Not Trigger resetcamera on KeyR
*/
keybindResetCamera: PropTypes.bool,
};

0 comments on commit 5182206

Please sign in to comment.