From 44800b50ef33cc14df1554f5beaea404bd4c2716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Tue, 31 Dec 2024 18:30:44 +0300 Subject: [PATCH] feat: disable rotation --- src/components/Universe/Controls/CameraAnimations/index.ts | 2 +- src/stores/useGraphStore/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Universe/Controls/CameraAnimations/index.ts b/src/components/Universe/Controls/CameraAnimations/index.ts index ccc163e6e..26d87fe7a 100644 --- a/src/components/Universe/Controls/CameraAnimations/index.ts +++ b/src/components/Universe/Controls/CameraAnimations/index.ts @@ -52,7 +52,7 @@ export const useCameraAnimations = ( const { disableCameraRotation } = useGraphStore.getState() const { isUserDragging } = useControlStore.getState() - if (!disableCameraRotation && !isUserDragging) { + if (!disableCameraRotation && !isUserDragging && false) { cameraControlsRef.current.azimuthAngle += autoRotateSpeed * delta * MathUtils.DEG2RAD } diff --git a/src/stores/useGraphStore/index.ts b/src/stores/useGraphStore/index.ts index c893ec75a..3c2bd8b85 100644 --- a/src/stores/useGraphStore/index.ts +++ b/src/stores/useGraphStore/index.ts @@ -151,7 +151,7 @@ export const useGraphStore = create()((set, get) => ({ }, setSelectionData: (selectionGraphData) => set({ selectionGraphData }), setScrollEventsDisabled: (scrollEventsDisabled) => set({ scrollEventsDisabled }), - setDisableCameraRotation: (rotation) => set({ disableCameraRotation: true || rotation }), + setDisableCameraRotation: (rotation) => set({ disableCameraRotation: rotation }), setIsHovering: (isHovering) => set({ isHovering }), setGraphRadius: (graphRadius) => set({ graphRadius }), setSelectionGraphRadius: (selectionGraphRadius) => set({ selectionGraphRadius }),