share functionality WIP

This commit is contained in:
zadam
2021-12-06 22:53:17 +01:00
parent 67da877135
commit 08e8047d8a
5 changed files with 64 additions and 33 deletions

View File

@@ -4,7 +4,7 @@ const AbstractEntity = require('./abstract_entity');
const shareRoot = require("../../share_root");
class Branch extends AbstractEntity {
constructor([branchId, noteId, parentNoteId, prefix, notePosition, isExpanded]) {
constructor([branchId, noteId, parentNoteId, prefix, isExpanded]) {
super();
/** @param {string} */
@@ -15,8 +15,6 @@ class Branch extends AbstractEntity {
this.parentNoteId = parentNoteId;
/** @param {string} */
this.prefix = prefix;
/** @param {int} */
this.notePosition = notePosition;
/** @param {boolean} */
this.isExpanded = !!isExpanded;
@@ -35,10 +33,6 @@ class Branch extends AbstractEntity {
childNote.parentBranches.push(this);
}
if (!parentNote) {
console.log(this);
}
if (!parentNote.children.includes(childNote)) {
parentNote.children.push(childNote);
}