mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
layout changes
This commit is contained in:
@@ -52,6 +52,7 @@ export default class LinkMapWidget extends NoteContextAwareWidget {
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
this.$container = this.$widget.find(".link-map-container");
|
||||
|
||||
this.openState = 'small';
|
||||
@@ -177,7 +178,7 @@ export default class LinkMapWidget extends NoteContextAwareWidget {
|
||||
renderData(data, zoomToFit = true, zoomPadding = 10) {
|
||||
this.graph.graphData(data);
|
||||
|
||||
if (zoomToFit) {
|
||||
if (zoomToFit && data.nodes.length > 1) {
|
||||
setTimeout(() => this.graph.zoomToFit(400, zoomPadding), 1000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user