scroll to current note in the tree

This commit is contained in:
azivner
2017-09-16 11:37:50 -04:00
parent 4e298d9d85
commit fdc668e28b
4 changed files with 15 additions and 1 deletions

View File

@@ -179,4 +179,14 @@ function collapseTree() {
});
}
function scrollToCurrentNote() {
const node = getNodeByKey(globalCurrentNote.detail.note_id);
if (node) {
node.makeVisible({scrollIntoView: true});
node.setFocus();
}
}
$(document).bind('keydown', 'alt+c', collapseTree);