mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-04 23:06:07 +00:00
fix reset edge bend on change weight.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user