From 2021e4e345c7cfc554421509e88253dcddedcf07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 24 Feb 2021 19:33:17 +0100 Subject: [PATCH] Remove ugly workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/elements/ImageView.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 5f77b1ccfa..dc785aabb2 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -131,24 +131,18 @@ export default class ImageView extends React.Component { }; onRotateCounterClockwiseClick = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); const cur = this.state.rotation; const rotationDegrees = (cur - 90) % 360; this.setState({ rotation: rotationDegrees }); }; onRotateClockwiseClick = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); const cur = this.state.rotation; const rotationDegrees = (cur + 90) % 360; this.setState({ rotation: rotationDegrees }); }; onZoomInClick = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); if (this.state.zoom >= this.maxZoom) { this.setState({zoom: this.maxZoom}); return; @@ -160,8 +154,6 @@ export default class ImageView extends React.Component { }; onZoomOutClick = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); if (this.state.zoom <= this.minZoom) { this.setState({ zoom: this.minZoom, @@ -176,8 +168,6 @@ export default class ImageView extends React.Component { } onDownloadClick = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); const a = document.createElement("a"); a.href = this.props.src; a.download = this.props.name; @@ -185,8 +175,6 @@ export default class ImageView extends React.Component { } onOpenContextMenu = (ev) => { - ev.preventDefault(); - ev.stopPropagation(); this.setState({ contextMenuDisplay: true, }); @@ -198,10 +186,6 @@ export default class ImageView extends React.Component { }); } - onPanelClick = (ev) => { - this.props.onFinished(); - } - onStartMoving = ev => { ev.stopPropagation(); ev.preventDefault(); @@ -324,7 +308,7 @@ export default class ImageView extends React.Component { ref={ref => this.focusLock = ref} >
-
+
{info}