about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/ModalWindow.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/ModalWindow.razor')
-rw-r--r--MatrixRoomUtils.Web/Shared/ModalWindow.razor14
1 files changed, 7 insertions, 7 deletions
diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor b/MatrixRoomUtils.Web/Shared/ModalWindow.razor
index 2f001e1..beb7198 100644
--- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor
+++ b/MatrixRoomUtils.Web/Shared/ModalWindow.razor
@@ -74,13 +74,13 @@
     }
 
     private void MouseMove(MouseEventArgs obj) {
-        if (isDragging) {
-            _x += obj.ClientX - dragX;
-            _y += obj.ClientY - dragY;
-            dragX = obj.ClientX;
-            dragY = obj.ClientY;
-            StateHasChanged();
-        }
+        if (!isDragging) return;
+
+        _x += obj.ClientX - dragX;
+        _y += obj.ClientY - dragY;
+        dragX = obj.ClientX;
+        dragY = obj.ClientY;
+        StateHasChanged();
     }
 
 }