mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-03 14:26:26 +00:00
Added radius and diameter search
This commit is contained in:
@@ -33,6 +33,17 @@ FindConnectedComponentNew.prototype.getMessage = function(local)
|
||||
}
|
||||
|
||||
FindConnectedComponentNew.prototype.result = function(resultCallback)
|
||||
{
|
||||
this.calculate(true);
|
||||
|
||||
var result = {};
|
||||
result["version"] = 1;
|
||||
this.selectedObjects = this.component;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
FindConnectedComponentNew.prototype.calculate = function(fillUpText = false)
|
||||
{
|
||||
this.connectedComponentNumber = 0;
|
||||
this.component = {};
|
||||
@@ -55,7 +66,10 @@ FindConnectedComponentNew.prototype.result = function(resultCallback)
|
||||
{
|
||||
var stackElement = stack[i];
|
||||
this.component[stackElement.id] = connectedComponentNumber;
|
||||
stackElement.upText = connectedComponentNumber;
|
||||
if (fillUpText)
|
||||
{
|
||||
stackElement.upText = connectedComponentNumber;
|
||||
}
|
||||
|
||||
if (connectedVertex.hasOwnProperty(stackElement.id))
|
||||
{
|
||||
@@ -81,11 +95,12 @@ FindConnectedComponentNew.prototype.result = function(resultCallback)
|
||||
}
|
||||
}
|
||||
this.connectedComponentNumber = connectedComponentNumber;
|
||||
var result = {};
|
||||
result["version"] = 1;
|
||||
this.selectedObjects = this.component;
|
||||
|
||||
//var result = {};
|
||||
//result["version"] = 1;
|
||||
//this.selectedObjects = this.component;
|
||||
|
||||
return result;
|
||||
return this.connectedComponentNumber;
|
||||
}
|
||||
|
||||
FindConnectedComponentNew.prototype.getObjectSelectedGroup = function(object)
|
||||
|
||||
Reference in New Issue
Block a user