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