redesign of drag & drop, separation of active, focused and active notes in the tree, fixes #565

This commit is contained in:
zadam
2019-06-10 21:47:08 +02:00
parent 8ab081a3fd
commit 27659805f6
6 changed files with 48 additions and 44 deletions

View File

@@ -309,12 +309,6 @@ function clearSelectedNodes() {
for (const selectedNode of getSelectedNodes()) {
selectedNode.setSelected(false);
}
const currentNode = getActiveNode();
if (currentNode) {
currentNode.setSelected(true);
}
}
async function treeInitialized() {
@@ -388,13 +382,13 @@ function initFancyTree(tree) {
if (targetType === 'title' || targetType === 'icon') {
if (event.shiftKey) {
node.setSelected(!node.isSelected());
node.setFocus(true);
}
else if (event.ctrlKey) {
noteDetailService.loadNoteDetail(node.data.noteId, { newTab: true });
}
else {
node.setActive();
node.setSelected(true);
clearSelectedNodes();
}