little comment
This commit is contained in:
parent
9a13c0730b
commit
746596e5f3
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue