Browse Source
* feat: add customizable canvas navigation settings Add a new settings modal that allows users to configure canvas navigation preferences: - Pan Mode: Space + Drag (default), Middle Mouse, or Always On (ComfyUI-style) - Zoom Mode: Alt + Scroll (default), Ctrl + Scroll, or Scroll (no modifier) - Selection Mode: Click (default) or Alt + Drag Features: - Settings persist in localStorage - New canvas settings button in header (monitor icon) - Modal UI with radio button groups for each setting - React Flow props dynamically configured based on user preferences - Updated wheel event handler to respect zoom mode settings This addresses user requests for ComfyUI/TouchDesigner-style navigation where panning and zooming work without holding modifier keys. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: PR #65 review — altDrag selection bug, icon, dedup, tests - Fix altDrag selection mode: use selectionKeyCode="Alt" instead of selectionOnDrag=true which made drag-select work without any key - Replace misleading video camera icon with arrows-pointing-out for canvas navigation settings button - Extract duplicated settings buttons JSX into settingsButtons variable shared by both configured/unconfigured project branches - Add defensive useEffect to sync CanvasSettingsModal state on open - Add missing semicolon in types/index.ts canvas re-export - Add localStorage tests for getCanvasNavigationSettings and saveCanvasNavigationSettings - Add integration tests for updateCanvasNavigationSettings - Fix WorkflowCanvas test mocks to include canvasNavigationSettings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: move canvas navigation settings into Project Settings modal Consolidate canvas settings from standalone CanvasSettingsModal into a new "Canvas" tab in ProjectSetupModal. Remove "like ComfyUI" text, add Shift+Drag selection mode, and fix save button to bottom of dialog. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove double semicolon in types/index.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>handoff-20260429-1057
committed by
GitHub
11 changed files with 398 additions and 82 deletions
@ -0,0 +1,21 @@ |
|||
/** |
|||
* Canvas Navigation Types |
|||
* |
|||
* Defines types for canvas navigation and interaction preferences. |
|||
*/ |
|||
|
|||
export type PanMode = "space" | "middleMouse" | "always"; |
|||
export type ZoomMode = "scroll" | "altScroll" | "ctrlScroll"; |
|||
export type SelectionMode = "click" | "altDrag" | "shiftDrag"; |
|||
|
|||
export interface CanvasNavigationSettings { |
|||
panMode: PanMode; |
|||
zoomMode: ZoomMode; |
|||
selectionMode: SelectionMode; |
|||
} |
|||
|
|||
export const defaultCanvasNavigationSettings: CanvasNavigationSettings = { |
|||
panMode: "space", |
|||
zoomMode: "altScroll", |
|||
selectionMode: "click", |
|||
}; |
|||
Loading…
Reference in new issue