From a60535dd6e1acf721aa4adf578a427ee692d4801 Mon Sep 17 00:00:00 2001 From: Oleg Sh Date: Sun, 6 Mar 2022 21:19:17 +0200 Subject: [PATCH] Fix distance matrix --- script/EventHandlers.js | 10 +++++----- tpl/home.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/script/EventHandlers.js b/script/EventHandlers.js index d743464..0b0045e 100644 --- a/script/EventHandlers.js +++ b/script/EventHandlers.js @@ -1083,14 +1083,14 @@ ShowDistanceMatrix.prototype.GetIncidenceMatrix = function (rawMatrix) { for (var j = 0; j < rawMatrix[i].length; j++) { - if ((new Graph()).infinity == rawMatrix[i][j]) - { - matrix += '\u221E'; - } - else if (i == j) + if (i == j) { matrix += "0"; } + else if ((new Graph()).infinity == rawMatrix[i][j]) + { + matrix += '\u221E'; + } else { matrix += rawMatrix[i][j]; diff --git a/tpl/home.php b/tpl/home.php index dc26bd0..b7d40db 100755 --- a/tpl/home.php +++ b/tpl/home.php @@ -10,7 +10,7 @@ - +