mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-06-15 21:30:56 +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)
|
BaseHandler.prototype.GetSelectedGraph = function(pos)
|
||||||
{
|
{
|
||||||
// Selected Graph.
|
// Selected Graph.
|
||||||
|
var res = null;
|
||||||
for (var i = 0; i < this.app.graph.vertices.length; i ++)
|
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)
|
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)
|
BaseHandler.prototype.GetSelectedArc = function(pos)
|
||||||
|
|||||||
+7
-6
@@ -277,12 +277,13 @@ function postLoadPage()
|
|||||||
{
|
{
|
||||||
selectHandler('DeleteObject', 'delete');
|
selectHandler('DeleteObject', 'delete');
|
||||||
}
|
}
|
||||||
else if (key == 'n' || key == 'т') // new
|
// 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");
|
// userAction('NewGraph_shortcut');
|
||||||
application.SetDefaultTransformations();
|
// application.SetHandlerMode("deleteAll");
|
||||||
}
|
// application.SetDefaultTransformations();
|
||||||
|
//}
|
||||||
else if (key == 'm' || key == 'ь') // move
|
else if (key == 'm' || key == 'ь') // move
|
||||||
{
|
{
|
||||||
selectHandler('Default', 'default');
|
selectHandler('Default', 'default');
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script src="<?= Root('i/js/dev/jquery-ui.js')?>"></script>
|
<script src="<?= Root('i/js/dev/jquery-ui.js')?>"></script>
|
||||||
<script src="<?= Root('i/js/dev/jquery.feedback_me.js')?>"></script>
|
<script src="<?= Root('i/js/dev/jquery.feedback_me.js')?>"></script>
|
||||||
<script src="<?= Root("script/example.js?v=23")?>" ></script>
|
<script src="<?= Root("script/example.js?v=24")?>" ></script>
|
||||||
</head>
|
</head>
|
||||||
<!--
|
<!--
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<span class="glyphicon glyphicon-cog fa-fw"></span><span class="hidden-phone"> <?= L('graph')?> </span><span class="caret"></span></button>
|
<span class="glyphicon glyphicon-cog fa-fw"></span><span class="hidden-phone"> <?= L('graph')?> </span><span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
<li>
|
<li>
|
||||||
<button type="button" class="btn btn-default btn-sm btn-submenu" id="NewGraph"><span class="glyphicon glyphicon-plus fa-fw"></span> <?= L('new_graph')?> <span style="float:right">n</span></button>
|
<button type="button" class="btn btn-default btn-sm btn-submenu" id="NewGraph"><span class="glyphicon glyphicon-plus fa-fw"></span> <?= L('new_graph')?> </button>
|
||||||
</li>
|
</li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
Reference in New Issue
Block a user