fix show paths

This commit is contained in:
azivner 2018-06-09 09:32:13 -04:00
parent 654c116c58
commit 736704c7d6

View File

@ -183,7 +183,7 @@ async function getRunPath(notePath) {
return effectivePath.reverse(); return effectivePath.reverse();
} }
async function showParentList(noteId, node) { async function showPaths(noteId, node) {
utils.assertArguments(noteId, node); utils.assertArguments(noteId, node);
const note = await treeCache.getNote(noteId); const note = await treeCache.getNote(noteId);
@ -191,10 +191,6 @@ async function showParentList(noteId, node) {
$notePathCount.html(parents.length + " path" + (parents.length > 0 ? "s" : "")); $notePathCount.html(parents.length + " path" + (parents.length > 0 ? "s" : ""));
if (parents.length <= 1) {
}
else {
//$notePathList.show();
$notePathList.empty(); $notePathList.empty();
for (const parentNote of parents) { for (const parentNote of parents) {
@ -212,7 +208,6 @@ async function showParentList(noteId, node) {
$notePathList.append(item); $notePathList.append(item);
} }
} }
}
async function getSomeNotePath(note) { async function getSomeNotePath(note) {
utils.assertArguments(note); utils.assertArguments(note);
@ -323,7 +318,7 @@ function initFancyTree(tree) {
noteDetailService.switchToNote(node.noteId); noteDetailService.switchToNote(node.noteId);
showParentList(node.noteId, data.node); showPaths(node.noteId, data.node);
}, },
expand: (event, data) => setExpandedToServer(data.node.data.branchId, true), expand: (event, data) => setExpandedToServer(data.node.data.branchId, true),
collapse: (event, data) => setExpandedToServer(data.node.data.branchId, false), collapse: (event, data) => setExpandedToServer(data.node.data.branchId, false),