mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-06-17 14:22:02 +00:00
Up max vertex number
This commit is contained in:
+3
-1
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user