Commit 394a5716 authored by techird's avatar techird

dev

parent 5e687016
...@@ -153,6 +153,7 @@ define(function(require, exports, module) { ...@@ -153,6 +153,7 @@ define(function(require, exports, module) {
['left', 'right', 'up', 'down'].forEach(function(key) { ['left', 'right', 'up', 'down'].forEach(function(key) {
if (e.isShortcutKey(key)) { if (e.isShortcutKey(key)) {
navigateTo(minder, key == 'up' ? 'top' : key); navigateTo(minder, key == 'up' ? 'top' : key);
e.preventDefault();
} }
}); });
} }
......
...@@ -90,7 +90,7 @@ define(function(require, exports, module) { ...@@ -90,7 +90,7 @@ define(function(require, exports, module) {
}, },
queryState: function(km) { queryState: function(km) {
var selectedNode = km.getSelectedNode(); var selectedNode = km.getSelectedNode();
return selectedNode ? 0 : -1; return selectedNode && !selectedNode.isRoot() ? 0 : -1;
} }
}); });
...@@ -98,7 +98,7 @@ define(function(require, exports, module) { ...@@ -98,7 +98,7 @@ define(function(require, exports, module) {
base: Command, base: Command,
execute: function(km, text) { execute: function(km, text) {
var nodes = km.getSelectedNodes(); var nodes = km.getSelectedNodes();
nodes.sort(function(a, b) { nodes.sort(function(a, b) {
return a.getIndex() - b.getIndex(); return a.getIndex() - b.getIndex();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment