Turn on negative edge weight support

This commit is contained in:
Oleg Sh
2024-03-28 21:49:04 +01:00
parent 1adf364131
commit 2e302b9013
21 changed files with 148 additions and 25 deletions

View File

@@ -256,7 +256,7 @@ BaseEdge.prototype.SetWeight = function(weight)
{
useWeight = true;
}
weight = (!isNaN(parseInt(weight, 10)) && weight >= 0) ? weight : 1;
weight = (!isNaN(parseInt(weight, 10))/*&& weight >= 0*/) ? weight : 1;
this.weight = Number(weight);
this.useWeight = useWeight;