Skip to content

Commit 5fc853c

Browse files
committed
Improvements to Edge Fade in and out.
Fix Zoom To Fit for hidden graphs
1 parent 9648b62 commit 5fc853c

File tree

9 files changed

+271
-158
lines changed

9 files changed

+271
-158
lines changed

example/lib/large_tree_graphview.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ class _LargeTreeViewPageState extends State<LargeTreeViewPage> with TickerProvid
101101
controller: _controller,
102102
graph: graph,
103103
algorithm: algorithm,
104-
// initialNode: ValueKey(1),
104+
centerGraph: true,
105+
initialNode: ValueKey(1),
105106
panAnimationDuration: Duration(milliseconds: 750),
106107
toggleAnimationDuration: Duration(milliseconds: 750),
107108
// edgeBuilder: (Edge edge, EdgeGeometry geometry) {

example/lib/tree_graphview.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ class _TreeViewPageState extends State<TreeViewPage> with TickerProviderStateMix
218218
Node.Id(36), // Yoga
219219
];
220220

221-
_controller.setInitiallyCollapsedNodes([tech, business, personal]);
222221
// Build the graph structure
223222
graph.addEdge(root, tech);
224223
graph.addEdge(root, business, paint: Paint()..color = Colors.blue);
@@ -277,6 +276,7 @@ class _TreeViewPageState extends State<TreeViewPage> with TickerProviderStateMix
277276
for (final exerciseNode in exerciseDetails) {
278277
graph.addEdge(healthDetails[0], exerciseNode, paint: Paint()..color = Colors.amber);
279278
}
279+
_controller.setInitiallyCollapsedNodes(graph, [tech, business, personal]);
280280

281281
builder
282282
..siblingSeparation = (100)

0 commit comments

Comments
 (0)