mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-03 08:15:38 +00:00
Fix hamiltonpath for non multi graphs.
This commit is contained in:
parent
b4c9fdd62a
commit
4fbe526813
@ -55,8 +55,16 @@ FindHamiltonianPath.prototype.resultCallback = function(pathObjects, properties,
|
||||
var nodesEdgesPath = this.GetNodesEdgesPath(results, 1, results.length - 1);
|
||||
var nodesPath = this.GetNodesPath(results, 1, results.length - 1);
|
||||
|
||||
outputResult["pathsWithEdges"] = [];
|
||||
outputResult["pathsWithEdges"].push(nodesEdgesPath);
|
||||
if (this.graph.isMulti())
|
||||
{
|
||||
outputResult["pathsWithEdges"] = [];
|
||||
outputResult["pathsWithEdges"].push(nodesEdgesPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
outputResult["paths"] = [];
|
||||
outputResult["paths"].push(nodesEdgesPath);
|
||||
}
|
||||
this.selectedObjects = [];
|
||||
|
||||
for (var i = 0; i < pathObjects.length; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user