From 746596e5f320f6c99bacf2ee2a749fced4f5de20 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Sat, 6 Apr 2019 12:09:29 +0200 Subject: [PATCH] little comment --- www/js/hugvey_console.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/hugvey_console.js b/www/js/hugvey_console.js index a940842..306f303 100644 --- a/www/js/hugvey_console.js +++ b/www/js/hugvey_console.js @@ -1247,13 +1247,13 @@ class Graph { this.data.push( dir ); let skipDistances; - // orphaned target and source has no other destinations. We can copy the position: + // orphaned target and source has no other destinations. We can copy the vertical position: if(this.getDirectionsFrom( source ).length < 1 && this.getDirectionsFrom( target ).length < 1 && this.getDirectionsTo( target ).length < 1) { skipDistances = true; let distance = this.distances[source['@id']]; - console.log('source distance', distance); let d = [distance[0] + 1, distance[1]]; - console.log('target distance', d); + // create a distance based on source's position + // this saves us from running the slow calculateDistancesFromStart this.distances[target['@id']] = d; } else { skipDistances = false;