diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 0e11eda7d0..288d3495d3 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -123,19 +123,25 @@ export default class ImageView extends React.Component { }); }; - onRotateCounterClockwiseClick = () => { + onRotateCounterClockwiseClick = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); const cur = this.state.rotation; const rotationDegrees = (cur - 90) % 360; this.setState({ rotation: rotationDegrees }); }; - onRotateClockwiseClick = () => { + onRotateClockwiseClick = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); const cur = this.state.rotation; const rotationDegrees = (cur + 90) % 360; this.setState({ rotation: rotationDegrees }); }; - onZoomInClick = () => { + onZoomInClick = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); if (this.state.zoom >= this.maxZoom) { this.setState({zoom: this.maxZoom}); return; @@ -146,7 +152,9 @@ export default class ImageView extends React.Component { }); }; - onZoomOutClick = () => { + onZoomOutClick = (ev) => { + ev.preventDefault(); + ev.stopPropagation(); if (this.state.zoom <= this.minZoom) { this.setState({ zoom: this.minZoom, @@ -160,6 +168,10 @@ export default class ImageView extends React.Component { }); } + onPanelClick = (ev) => { + this.props.onFinished(); + } + onStartMoving = ev => { ev.stopPropagation(); ev.preventDefault(); @@ -235,10 +247,7 @@ export default class ImageView extends React.Component { ref={ref => this.focusLock = ref} >
-
-
- { metadata } -
+