Idea detail
reframe_animation
reqlan rq/extension/library/graph.rq:177
Summary
The first reframe on a controller mount is instant ( synchronous cy. fit + cy. center ) so the graph appears immediately on first paint.
Every subsequent reframe — automatic ( auto_reframe ) or manual ( manual_reframe ) — animates pan and zoom smoothly over GRAPH_REFRAME_ANIMATION_MS using cytoscape. animate ( { fit, easing: ' ease-out-cubic ' } ).
Callers may pass `reframeToViewport({ animate: false })` to force an instant reframe.
Initial batch layouts use fit: false ( see graph_cytoscape ) so the controller owns the first fit and later animated handoffs are not double-applied.
Attributes
No attributes declared.
Ancestor context
The graph should automatically fit to the viewport when the loaded node set changes — without requiring the user to click " Fit to view ". After each successful syncSlice, GraphCyController compares the sorted node-id set of the incoming slice with fittedNodeSetKey ( the set the viewport was last fitted to ). When they differ, finishRender triggers an automatic reframe via reframeToViewport. Triggers when any node is added or removed from the slice ( new neighbourhood, focus change, filter change that changes membership ). Does not trigger for metadata-only updates on the same node ids ( label, colour, isCenter flag, etc. ) — those keep the user's current pan / zoom. Does not trigger on requestLayout relayout when the node-id set is unchanged.
manual_reframeUsers can explicitly reframe the viewport when pan / zoom has moved the graph off-screen or they want to see the whole neighbourhood again. - " Fit to view " control in ["../../../packages/extension/webviews/ideas-summary/components/GraphControls.svelte"] dispatches to GraphView → GraphCyController. reframeToViewport ( ). - " Fit to view " control in ["../../../packages/extension/webviews/activity-bar/components/MiniGraphCanvas.svelte"] calls the same API on the mini-graph controller. Every graph surface that mounts GraphCyController should expose this control.
graph_cytoscapebuilds cytoscape elements and stylesheet from a generic node / edge slice. registers batch layout options ( fcose, cola, breadthfirst, circle, concentric, grid, random ) and seeds positions for new nodes. exposes CompoundBasis ( single-membership folder tree ) and GroupBasis ( flat multi-membership ) as grouping inputs. per ["../../../packages/extension/webviews/shared/graph/graph-cytoscape.ts"] and ["../../../packages/extension/webviews/shared/graph/graph-theme.ts"]. getLayoutConfig sets fit: false for initial ( mode = = = ' initial' ) batch layouts so [auto_reframe] owns the first viewport fit; relayout modes may still fit via the layout algorithm.
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | auto_reframe | reqlan rq/extension/library/graph.rq | auto_reframe |
| references | graph_cytoscape | reqlan rq/extension/library/graph.rq | graph_cytoscape |
| references | manual_reframe | reqlan rq/extension/library/graph.rq | manual_reframe |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | reframe_view | reqlan rq/extension/library/graph.rq | reframe_animation |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Initialising graph…