mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-10-20 07:24:21 +00:00
Fix edge selection.
This commit is contained in:
1 parent
6c4e18ce99
commit
c85469fa08
7 files changed
+31
-32
No files matched your search
@@ -49,22 +49,22 @@ BaseHandler.prototype.GetSelectedGraph = function(pos)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
BaseHandler.prototype.GetSelectedArc = function(pos)
|
||||
{
|
||||
// Selected Arc.
|
||||
let res = null;
|
||||
for (var i = 0; i < this.app.graph.edges.length; i ++)
|
||||
{
|
||||
var edge = this.app.graph.edges[i];
|
||||
|
||||
if (edge.HitTest(new Point(pos.x, pos.y)))
|
||||
return edge;
|
||||
res = edge; // Take last becase it will be on the top on rendering.
|
||||
}
|
||||
|
||||
return null;
|
||||
return res;
|
||||
}
|
||||
|
||||
BaseHandler.prototype.GetSelectedObject = function(pos)
|
||||
|
||||
Reference in new issue
Block a user