layout changes

This commit is contained in:
zadam
2021-06-13 22:55:31 +02:00
parent e054a1694e
commit fb31acc8e0
30 changed files with 125 additions and 73 deletions

View File

@@ -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);
}
}