Fix Issues: changes select object by Z order. Remove hotkey for New Graph.

This commit is contained in:
Unick Soft
2020-02-15 11:33:12 +02:00
parent 5d82259ea9
commit a5e44e1858
3 changed files with 13 additions and 10 deletions

View File

@@ -42,16 +42,18 @@ BaseHandler.prototype.SetObjects = function(objects)
BaseHandler.prototype.GetSelectedGraph = function(pos)
{
// Selected Graph.
var res = null;
for (var i = 0; i < this.app.graph.vertices.length; i ++)
{
if (this.app.graph.vertices[i].position.distance(pos) < this.app.graph.vertices[i].model.diameter / 2.0)
{
return this.app.graph.vertices[i];
// Select last of them.
res = this.app.graph.vertices[i];
}
}
return null;
return res;
}
BaseHandler.prototype.GetSelectedArc = function(pos)