mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-07 18:27:45 +02:00
[eric] canvas: double-click to frame everything keeps a readable floor instead of bottoming out at 15%
This commit is contained in:
@@ -6,6 +6,7 @@ import { isAgentDrivenBrowser } from '@/shared/isAgentDrivenBrowser';
|
||||
import { expandSession } from '@/shared/state/agentsSlice';
|
||||
import { bringToFront } from '@/shared/state/dashboardLayoutSlice';
|
||||
import { setScrollFocusedCard } from '@/shared/cardScrollFocus';
|
||||
import { REVEAL_MIN_ZOOM } from '../../canvas/revealZoom';
|
||||
import type { CardType, useDashboardSelection } from '../state/useDashboardSelection';
|
||||
import type { useCanvasControls } from './useCanvasControls';
|
||||
|
||||
@@ -228,7 +229,9 @@ export function useDashboardInteractions({
|
||||
report('dashboard', 'canvas_double_clicked');
|
||||
// Double-tap on empty space = show me everything (Eric's call): the same animated fit the
|
||||
// overview affordances use, instead of the old blind 0.55x zoom-out that just lost people.
|
||||
canvas.actions.fitToView();
|
||||
// Floored like tidy and reveal, because unfloored it clamped at MIN_ZOOM and a spread-out canvas
|
||||
// landed at 15%, every card a postage stamp. That is the same "lost people" this was meant to fix.
|
||||
canvas.actions.fitToView(REVEAL_MIN_ZOOM);
|
||||
}, [canvas.actions]);
|
||||
|
||||
// Double-click a card → always expand + center + zoom (cancels pending collapse from single-click)
|
||||
|
||||
Reference in New Issue
Block a user