mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
2b273974b4
commit
5fcd59146e
1 changed files with 7 additions and 0 deletions
|
|
@ -551,6 +551,13 @@ export class Graph extends Model {
|
|||
clearTimeout(this.timeout);
|
||||
addScript(`${Constants.PROTYLE_CDN}/js/vis/vis-network.min.js?v=9.1.2`, "protyleVisScript").then(() => {
|
||||
this.timeout = window.setTimeout(() => {
|
||||
if (!this.graphData || !this.graphData.nodes || this.graphData.nodes.length === 0) {
|
||||
if (this.network) {
|
||||
this.network.destroy();
|
||||
}
|
||||
this.graphElement.firstElementChild.classList.add("fn__none");
|
||||
return;
|
||||
}
|
||||
this.graphElement.firstElementChild.classList.remove("fn__none");
|
||||
this.graphElement.firstElementChild.firstElementChild.setAttribute("style", "width:3%");
|
||||
const config = window.siyuan.config.graph[this.type === "global" ? "global" : "local"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue