From d58c17ff3bfb75c61329979b7ea8d3ccd69bfe70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 25 Feb 2021 07:50:53 +0100 Subject: [PATCH] Show grabbing cursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/elements/_ImageView.scss | 4 ---- src/components/views/elements/ImageView.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/res/css/views/elements/_ImageView.scss b/res/css/views/elements/_ImageView.scss index f904d31330..d864ad9adf 100644 --- a/res/css/views/elements/_ImageView.scss +++ b/res/css/views/elements/_ImageView.scss @@ -47,10 +47,6 @@ limitations under the License. max-height: 70vh; min-width: 100px; min-height: 100px; - - &:hover { - cursor: grab; - } } .mx_ImageView_panel { diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 073b9dddbd..51e700c481 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -264,6 +264,7 @@ export default class ImageView extends React.Component { * we would apply the translation to an already rotated * image causing it translate in the wrong direction. */ const style = { + cursor: this.state.moving ? "grabbing" : "grab", transform: `translateX(${translatePixelsX}) translateY(${translatePixelsY}) scale(${zoomPercentage})