Up max vertex number

This commit is contained in:
Oleg Sh
2021-06-16 21:38:26 +02:00
parent 320de9f399
commit 1de5a3128b
+3 -1
View File
@@ -22,10 +22,12 @@ function Graph()
// infinity // infinity
Graph.prototype.infinity = 1E8; Graph.prototype.infinity = 1E8;
// Max vertexes
Graph.prototype.maxVertexes = 1000;
Graph.prototype.AddNewVertex = function(vertex) Graph.prototype.AddNewVertex = function(vertex)
{ {
if (this.vertices.length < 300) if (this.vertices.length <= this.maxVertexes)
{ {
vertex.SetId (this.uidGraph); vertex.SetId (this.uidGraph);
this.uidGraph = this.uidGraph + 1; this.uidGraph = this.uidGraph + 1;