fix reset edge bend on change weight.

This commit is contained in:
Unick Soft
2019-06-13 19:49:02 +02:00
parent e8a985c91b
commit 2394894f72
4 changed files with 121 additions and 108 deletions

View File

@@ -34,13 +34,7 @@ Graph.prototype.AddNewVertex = function(vertex)
Graph.prototype.AddNewEdgeSafe = function(graph1, graph2, isDirect, weight)
{
var useWeight = false;
if (!isNaN(parseInt(weight, 10)))
{
useWeight = true;
}
weight = (!isNaN(parseInt(weight, 10)) && weight >= 0) ? weight : 1;
return this.AddNewEdge(new BaseEdge(graph1, graph2, isDirect, weight, useWeight, 0));
return this.AddNewEdge(new BaseEdge(graph1, graph2, isDirect, weight));
}
Graph.prototype.AddNewEdge = function(edge)