From e991401c29894550af0144c0ee06c35bc508d538 Mon Sep 17 00:00:00 2001 From: Catatomik Date: Fri, 25 Jun 2021 01:00:27 +0200 Subject: [PATCH] :bug: Mise en valeur du chemin --- graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.js b/graph.js index 1e38ea0..3fc6ada 100644 --- a/graph.js +++ b/graph.js @@ -157,7 +157,7 @@ function createEdges(G, sommets) { const fromIndex = chemin.indexOf(S[x]) const toIndex = chemin.indexOf(S[y]) - const onPath = fromIndex > -1 && toIndex > -1 && (fromIndex == toIndex-1 || fromIndex-1 == toIndex) + const onPath = fromIndex > -1 && toIndex > -1 && (fromIndex == toIndex-1 || (fromIndex-1 == toIndex && !pondere)) aretes.push({ from,