Kaynağa Gözat

Fix stiky move on mac

Jeremie Pardou-Piquemal 3 yıl önce
ebeveyn
işleme
5e149728df
1 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  1. 3 5
      src/components/Board/PanZoomRotate.js

+ 3 - 5
src/components/Board/PanZoomRotate.js

@@ -108,11 +108,9 @@ const PanZoomRotate = ({ children }) => {
     }
   };
 
-  const onMouseUp = React.useCallback((e) => {
-    if (e.button === 1 || e.altKey) {
-      stateRef.current.moving = false;
-      wrapperRef.current.style.cursor = "auto";
-    }
+  const onMouseUp = React.useCallback(() => {
+    stateRef.current.moving = false;
+    wrapperRef.current.style.cursor = "auto";
   }, []);
 
   React.useEffect(() => {