Commit 5a5e326
improvement: add Classic/Freehand scroll mode toggle to canvas (#669)
- Added ScrollModeToggle component with Radix UI Switch (same design as InteractionModeToggle)
- Classic mode: scroll wheel zooms (default ReactFlow behavior)
- Freehand mode: scroll wheel pans canvas (Miro/Figma-style), Ctrl+scroll to zoom
- Setting persists via localStorage
- Applied to both WorkflowEditor and SubAgentFlowDialog canvases
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e99e624 commit 5a5e326Copy full SHA for 5a5e326
10 files changed
+200Lines changed: 200 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src/webview/src
- components
- dialogs
- i18n
- translations
- stores
Expand file treeCollapse file tree
Open diff view settings
Collapse file
src/webview/src/components/ScrollModeToggle.tsx
Copy file name to clipboard+155Lines changed: 155 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
Collapse file
src/webview/src/components/WorkflowEditor.tsx
Copy file name to clipboardExpand all lines: src/webview/src/components/WorkflowEditor.tsx+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
| 22 | + |
22 | 23 | |
23 | 24 | |
24 | 25 | |
| ||
46 | 47 | |
47 | 48 | |
48 | 49 | |
| 50 | + |
49 | 51 | |
50 | 52 | |
51 | 53 | |
| ||
122 | 124 | |
123 | 125 | |
124 | 126 | |
| 127 | + |
125 | 128 | |
126 | 129 | |
127 | 130 | |
| ||
338 | 341 | |
339 | 342 | |
340 | 343 | |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
341 | 348 | |
342 | 349 | |
343 | 350 | |
| ||
396 | 403 | |
397 | 404 | |
398 | 405 | |
| 406 | + |
399 | 407 | |
400 | 408 | |
401 | 409 | |
|
Collapse file
src/webview/src/components/dialogs/SubAgentFlowDialog.tsx
Copy file name to clipboardExpand all lines: src/webview/src/components/dialogs/SubAgentFlowDialog.tsx+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
| 24 | + |
24 | 25 | |
25 | 26 | |
26 | 27 | |
| ||
110 | 111 | |
111 | 112 | |
112 | 113 | |
| 114 | + |
113 | 115 | |
114 | 116 | |
115 | 117 | |
| ||
639 | 641 | |
640 | 642 | |
641 | 643 | |
| 644 | + |
| 645 | + |
| 646 | + |
| 647 | + |
642 | 648 | |
643 | 649 | |
644 | 650 | |
|
Collapse file
src/webview/src/i18n/translation-keys.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translation-keys.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
| 46 | + |
| 47 | + |
46 | 48 | |
47 | 49 | |
48 | 50 | |
|
Collapse file
src/webview/src/i18n/translations/en.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translations/en.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
src/webview/src/i18n/translations/ja.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translations/ja.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
src/webview/src/i18n/translations/ko.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translations/ko.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
src/webview/src/i18n/translations/zh-CN.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translations/zh-CN.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
src/webview/src/i18n/translations/zh-TW.ts
Copy file name to clipboardExpand all lines: src/webview/src/i18n/translations/zh-TW.ts+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
src/webview/src/stores/workflow-store.ts
Copy file name to clipboardExpand all lines: src/webview/src/stores/workflow-store.ts+19Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
37 | 44 | |
38 | 45 | |
39 | 46 | |
| ||
53 | 60 | |
54 | 61 | |
55 | 62 | |
| 63 | + |
56 | 64 | |
57 | 65 | |
58 | 66 | |
| ||
89 | 97 | |
90 | 98 | |
91 | 99 | |
| 100 | + |
92 | 101 | |
93 | 102 | |
94 | 103 | |
| ||
293 | 302 | |
294 | 303 | |
295 | 304 | |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
296 | 309 | |
297 | 310 | |
298 | 311 | |
| ||
404 | 417 | |
405 | 418 | |
406 | 419 | |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | + |
407 | 426 | |
408 | 427 | |
409 | 428 | |
|
0 commit comments