mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Merge 76064fbed47fae1c38cedb1fc153906c70bea3c8 into 82a437f2a83fc10299f3205713f7dcb04e2d047c
This commit is contained in:
commit
9a55a44d4f
@ -198,6 +198,10 @@ export default class RibbonContainer extends NoteContextAwareWidget {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const activeChild = this.getActiveRibbonWidget();
|
||||
if (activeChild) {
|
||||
activeChild.handleEvent('deactivated', {});
|
||||
}
|
||||
this.lastActiveComponentId = null;
|
||||
}
|
||||
}
|
||||
|
@ -219,6 +219,9 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
|
||||
async beforeNoteSwitchEvent({noteContext}) {
|
||||
if (this.isNoteContext(noteContext.ntxId)) {
|
||||
for (const x of this.children) {
|
||||
x.handleEvent("deactivated", {});
|
||||
}
|
||||
await this.spacedUpdate.updateNowIfNecessary();
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +138,11 @@ export default class NoteMapWidget extends NoteContextAwareWidget {
|
||||
this.renderData(data);
|
||||
}
|
||||
|
||||
deactivatedEvent() {
|
||||
this.graph.stopAnimation();
|
||||
this.graph = null;
|
||||
}
|
||||
|
||||
getMapRootNoteId() {
|
||||
if (this.widgetMode === 'ribbon') {
|
||||
return this.noteId;
|
||||
|
@ -23,4 +23,8 @@ export default class NoteMapTypeWidget extends TypeWidget {
|
||||
async doRefresh(note) {
|
||||
await this.noteMapWidget.refresh();
|
||||
}
|
||||
|
||||
deactivatedEvent() {
|
||||
this.noteMapWidget.deactivatedEvent();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user