Graph: Remove all debug print statements

Too much noise. I'll remove them later when I cleanup the code.
This commit is contained in:
Vishesh Handa
2020-09-26 05:37:14 +02:00
parent 4d3573da98
commit 6ede96a8ab
2 changed files with 10 additions and 14 deletions

View File

@ -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;

View File

@ -82,10 +82,10 @@ class _GraphViewState extends State<GraphView> {
}
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<GraphView> {
}
widget.graph.notify();
print("Pan update ${node.label} $pos");
// print("Pan update ${node.label} $pos");
},
),
left: node.x - (nodeSize / 2),