mirror of
https://github.com/zadam/trilium.git
synced 2024-09-30 20:45:58 +08:00
22 lines
543 B
JavaScript
22 lines
543 B
JavaScript
|
class Branch {
|
||
|
constructor(treeCache, row) {
|
||
|
this.treeCache = treeCache;
|
||
|
this.branchId = row.branchId;
|
||
|
this.noteId = row.noteId;
|
||
|
this.note = null;
|
||
|
this.parentNoteId = row.parentNoteId;
|
||
|
this.notePosition = row.notePosition;
|
||
|
this.prefix = row.prefix;
|
||
|
this.isExpanded = row.isExpanded;
|
||
|
}
|
||
|
|
||
|
async getNote() {
|
||
|
return this.treeCache.getNote(this.noteId);
|
||
|
}
|
||
|
|
||
|
get toString() {
|
||
|
return `Branch(branchId=${this.branchId})`;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default Branch;
|