drag and drop moves multiple items only if CTRL is pressed, active note has now bold text for more differentiation from selected note

This commit is contained in:
azivner 2019-01-23 21:13:04 +01:00
parent 4d0e46021b
commit e70af1300a
2 changed files with 19 additions and 1 deletions

View file

@ -9,6 +9,14 @@ const dragAndDropSetup = {
return false;
}
if (!data.originalEvent.ctrlKey) {
// keep existing selection only if CTRL key is pressed
for (const selectedNode of treeService.getSelectedNodes()) {
selectedNode.setSelected(false);
selectedNode.renderTitle();
}
}
node.setSelected(true);
// this is for dragging notes into relation map

View file

@ -258,13 +258,23 @@ span.fancytree-active.fancytree-focused .fancytree-title {
background-color: var(--active-item-background-color) !important;
border-color: #ddd !important;
border-radius: 3px;
font-weight: bold;
}
span.fancytree-active:not(.fancytree-focused) .fancytree-title, span.fancytree-selected .fancytree-title {
span.fancytree-active:not(.fancytree-focused) .fancytree-title {
color: var(--hover-item-text-color) !important;
background-color: var(--hover-item-background-color) !important;
border-color: #ddd !important;
border-radius: 3px;
font-weight: bold;
}
span.fancytree-selected:not(.fancytree-active) .fancytree-title {
color: var(--hover-item-text-color) !important;
background-color: var(--hover-item-background-color) !important;
border-color: #ddd !important;
border-radius: 3px;
font-style: italic;
}
span.fancytree-node:not(.fancytree-active):hover span.fancytree-title {