From 6ede96a8ab15e2e48509d71dffc26f6eb57e5803 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sat, 26 Sep 2020 05:37:14 +0200 Subject: [PATCH] Graph: Remove all debug print statements Too much noise. I'll remove them later when I cleanup the code. --- lib/core/graph.dart | 18 +++++++----------- lib/screens/graph_view.dart | 6 +++--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/core/graph.dart b/lib/core/graph.dart index a2885ab4..05776d5a 100644 --- a/lib/core/graph.dart +++ b/lib/core/graph.dart @@ -51,10 +51,10 @@ class Graph extends ChangeNotifier { Graph.fromFolder(NotesFolder folder) { initLayouter = GraphNodeLayout(maxHeight: 2000, maxWidth: 2000); - print("Building graph .... "); + // print("Building graph .... "); _addFolder(folder).then((_) { - print("Done Building graph"); - print("Starting layouting ..."); + // print("Done Building graph"); + // print("Starting layouting ..."); //startLayout(); }); @@ -80,12 +80,10 @@ class Graph extends ChangeNotifier { for (var l in links) { var noteB = linkResolver.resolveLink(l); if (noteB == null) { - print("not found $l"); + // print("not found $l"); continue; } - print("Adding edge .."); - var edge = Edge(node, _getNode(noteB)); edges.add(edge); } @@ -174,7 +172,7 @@ class Graph extends ChangeNotifier { const interval = Duration(milliseconds: 25); layoutTimer = Timer.periodic(interval, (Timer t) { bool shouldStop = _updateGraphPositions(this); - print("shouldStop $shouldStop"); + // print("shouldStop $shouldStop"); if (shouldStop) { layoutTimer.cancel(); layoutTimer = null; @@ -213,8 +211,6 @@ class GraphNodeLayout { node.x = x; node.y = y; - print('INIT ${node.label} -> ${node.x} ${node.y}'); - x += gap; if (x + nodeSize >= maxWidth) { x = startX; @@ -330,7 +326,7 @@ bool _updateGraphPositions(Graph g) { dy *= s; } - print('${node.label} $dx $dy'); + // print('${node.label} $dx $dy'); if (node.x - dx <= g.nodeSize / 2) { continue; } @@ -345,7 +341,7 @@ bool _updateGraphPositions(Graph g) { allBelowThreshold = false; } } - print('------------------'); + // print('------------------'); g.notify(); return allBelowThreshold; diff --git a/lib/screens/graph_view.dart b/lib/screens/graph_view.dart index 2e5bf7d2..e8b878cc 100644 --- a/lib/screens/graph_view.dart +++ b/lib/screens/graph_view.dart @@ -82,10 +82,10 @@ class _GraphViewState extends State { } widget.graph.notify(); - print("Pan start ${node.label} $pos"); + // print("Pan start ${node.label} $pos"); }, onPanEnd: (DragEndDetails details) { - print("Pan end ${node.label} $details"); + // print("Pan end ${node.label} $details"); node.pressed = false; widget.graph.notify(); }, @@ -102,7 +102,7 @@ class _GraphViewState extends State { } widget.graph.notify(); - print("Pan update ${node.label} $pos"); + // print("Pan update ${node.label} $pos"); }, ), left: node.x - (nodeSize / 2),