Skip to content

Commit 5182206

Browse files
authored
Merge pull request #94 from jun-sironamedical/feature/remove-reset-keybinding
feat(View): added keybindReset prop for optional reset binding
2 parents 0bd5eea + 7591621 commit 5182206

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/View.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export default class View extends Component {
205205
}
206206
switch (e.code) {
207207
case 'KeyR':
208-
this.resetCamera();
208+
if (props.keybindResetCamera) this.resetCamera();
209209
break;
210210
default:
211211
// console.log(e.code);
@@ -737,6 +737,7 @@ View.defaultProps = {
737737
showCubeAxes: false,
738738
pointerSize: 0,
739739
showOrientationAxes: false,
740+
keybindResetCamera: true,
740741
};
741742

742743
View.propTypes = {
@@ -905,4 +906,9 @@ View.propTypes = {
905906
* Show/Hide orientation axes.
906907
*/
907908
showOrientationAxes: PropTypes.bool,
909+
910+
/**
911+
* Trigger/Not Trigger resetcamera on KeyR
912+
*/
913+
keybindResetCamera: PropTypes.bool,
908914
};

0 commit comments

Comments
 (0)