mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Fix Issues: changes select object by Z order. Remove hotkey for New Graph.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -277,12 +277,13 @@ function postLoadPage()
|
||||
{
|
||||
selectHandler('DeleteObject', 'delete');
|
||||
}
|
||||
else if (key == 'n' || key == 'т') // new
|
||||
{
|
||||
userAction('NewGraph_shortcut');
|
||||
application.SetHandlerMode("deleteAll");
|
||||
application.SetDefaultTransformations();
|
||||
}
|
||||
// Disabled becase it is easy to lose graph, when you press miss letter.
|
||||
//else if (key == 'n' || key == 'т') // new
|
||||
//{
|
||||
// userAction('NewGraph_shortcut');
|
||||
// application.SetHandlerMode("deleteAll");
|
||||
// application.SetDefaultTransformations();
|
||||
//}
|
||||
else if (key == 'm' || key == 'ь') // move
|
||||
{
|
||||
selectHandler('Default', 'default');
|
||||
|
||||
Reference in New Issue
Block a user