UNPKG

@antv/g6

Version:

graph visualization frame work

1 lines 59.1 kB
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-1f627c6ab08a013428c170a3abb02a20-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Node继承自Item,所以,Item上面的方法在Node实例中都可以调用。","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":39,"offset":39},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":39,"offset":39},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#lock","title":null,"children":[],"data":{"hProperties":{"aria-label":"lock permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"lock()","position":{"start":{"line":5,"column":4,"offset":45},"end":{"line":5,"column":10,"offset":51},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":42},"end":{"line":5,"column":10,"offset":51},"indent":[]},"data":{"id":"lock","htmlAttributes":{"id":"lock"},"hProperties":{"id":"lock"}}},{"type":"blockquote","children":[{"type":"paragraph","children":[{"type":"text","value":"3.1.4 版本新增","position":{"start":{"line":6,"column":3,"offset":54},"end":{"line":6,"column":13,"offset":64},"indent":[]}}],"position":{"start":{"line":6,"column":3,"offset":54},"end":{"line":6,"column":13,"offset":64},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":52},"end":{"line":6,"column":13,"offset":64},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"锁定当前节点,锁定节点后,该节点不再响应拖动节点的事件。","position":{"start":{"line":8,"column":1,"offset":66},"end":{"line":8,"column":29,"offset":94},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":66},"end":{"line":8,"column":29,"offset":94},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"提示锁定节点后,拖动画布和缩放画布的操作依然对该节点有效,如果想在锁定节点后,不响应拖动画布和缩放的事件,需要自定义拖动画布和缩放的 Behavior,具体可参考锁定节点不响应拖动画布的事件【todo】和锁定节点不响应缩放事件【todo】。","position":{"start":{"line":10,"column":1,"offset":96},"end":{"line":10,"column":121,"offset":216},"indent":[]}}],"position":{"start":{"line":10,"column":1,"offset":96},"end":{"line":10,"column":121,"offset":216},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":13,"column":3,"offset":221},"end":{"line":13,"column":5,"offset":223},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":219},"end":{"line":13,"column":7,"offset":225},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":219},"end":{"line":13,"column":7,"offset":225},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> node <span class=\"token operator\">=</span> graph<span class=\"token punctuation\">.</span><span class=\"token function\">findById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'node'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nnode<span class=\"token punctuation\">.</span><span class=\"token function\">lock</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":15,"column":1,"offset":227},"end":{"line":18,"column":4,"offset":292},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#unlock","title":null,"children":[],"data":{"hProperties":{"aria-label":"unlock permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"unlock()","position":{"start":{"line":21,"column":4,"offset":298},"end":{"line":21,"column":12,"offset":306},"indent":[]}}],"position":{"start":{"line":21,"column":1,"offset":295},"end":{"line":21,"column":12,"offset":306},"indent":[]},"data":{"id":"unlock","htmlAttributes":{"id":"unlock"},"hProperties":{"id":"unlock"}}},{"type":"blockquote","children":[{"type":"paragraph","children":[{"type":"text","value":"3.1.4 版本新增","position":{"start":{"line":22,"column":3,"offset":309},"end":{"line":22,"column":13,"offset":319},"indent":[]}}],"position":{"start":{"line":22,"column":3,"offset":309},"end":{"line":22,"column":13,"offset":319},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":307},"end":{"line":22,"column":13,"offset":319},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"解锁锁定的节点。","position":{"start":{"line":24,"column":1,"offset":321},"end":{"line":24,"column":9,"offset":329},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":321},"end":{"line":24,"column":9,"offset":329},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":27,"column":3,"offset":334},"end":{"line":27,"column":5,"offset":336},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":332},"end":{"line":27,"column":7,"offset":338},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":332},"end":{"line":27,"column":7,"offset":338},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> node <span class=\"token operator\">=</span> graph<span class=\"token punctuation\">.</span><span class=\"token function\">findById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'node'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nnode<span class=\"token punctuation\">.</span><span class=\"token function\">unlock</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":29,"column":1,"offset":340},"end":{"line":32,"column":4,"offset":407},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#haslocked","title":null,"children":[],"data":{"hProperties":{"aria-label":"haslocked permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"hasLocked()","position":{"start":{"line":35,"column":4,"offset":413},"end":{"line":35,"column":15,"offset":424},"indent":[]}}],"position":{"start":{"line":35,"column":1,"offset":410},"end":{"line":35,"column":15,"offset":424},"indent":[]},"data":{"id":"haslocked","htmlAttributes":{"id":"haslocked"},"hProperties":{"id":"haslocked"}}},{"type":"blockquote","children":[{"type":"paragraph","children":[{"type":"text","value":"3.1.4 版本新增","position":{"start":{"line":36,"column":3,"offset":427},"end":{"line":36,"column":13,"offset":437},"indent":[]}}],"position":{"start":{"line":36,"column":3,"offset":427},"end":{"line":36,"column":13,"offset":437},"indent":[]}}],"position":{"start":{"line":36,"column":1,"offset":425},"end":{"line":36,"column":13,"offset":437},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"检测节点是否处于锁定状态。","position":{"start":{"line":38,"column":1,"offset":439},"end":{"line":38,"column":14,"offset":452},"indent":[]}}],"position":{"start":{"line":38,"column":1,"offset":439},"end":{"line":38,"column":14,"offset":452},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":41,"column":3,"offset":457},"end":{"line":41,"column":6,"offset":460},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":455},"end":{"line":41,"column":8,"offset":462},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":455},"end":{"line":41,"column":8,"offset":462},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:boolean;","position":{"start":{"line":43,"column":3,"offset":466},"end":{"line":43,"column":17,"offset":480},"indent":[]}}],"position":{"start":{"line":43,"column":3,"offset":466},"end":{"line":43,"column":17,"offset":480},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":464},"end":{"line":43,"column":17,"offset":480},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回 true 表示当前解锁处于锁定状态,否则表示未锁定。","position":{"start":{"line":44,"column":3,"offset":483},"end":{"line":44,"column":32,"offset":512},"indent":[]}}],"position":{"start":{"line":44,"column":3,"offset":483},"end":{"line":44,"column":32,"offset":512},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":481},"end":{"line":44,"column":32,"offset":512},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":464},"end":{"line":44,"column":32,"offset":512},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":47,"column":3,"offset":517},"end":{"line":47,"column":5,"offset":519},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":515},"end":{"line":47,"column":7,"offset":521},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":515},"end":{"line":47,"column":7,"offset":521},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> node <span class=\"token operator\">=</span> graph<span class=\"token punctuation\">.</span><span class=\"token function\">findById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'node'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> hasLocked <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">hasLocked</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":49,"column":1,"offset":523},"end":{"line":52,"column":4,"offset":611},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getedges","title":null,"children":[],"data":{"hProperties":{"aria-label":"getedges permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getEdges()","position":{"start":{"line":55,"column":4,"offset":617},"end":{"line":55,"column":14,"offset":627},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":614},"end":{"line":55,"column":14,"offset":627},"indent":[]},"data":{"id":"getedges","htmlAttributes":{"id":"getedges"},"hProperties":{"id":"getedges"}}},{"type":"paragraph","children":[{"type":"text","value":"获取与当前节点有关联的所有边。","position":{"start":{"line":56,"column":1,"offset":628},"end":{"line":56,"column":16,"offset":643},"indent":[]}}],"position":{"start":{"line":56,"column":1,"offset":628},"end":{"line":56,"column":16,"offset":643},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":59,"column":3,"offset":648},"end":{"line":59,"column":6,"offset":651},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":646},"end":{"line":59,"column":8,"offset":653},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":646},"end":{"line":59,"column":8,"offset":653},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:Edge[];","position":{"start":{"line":61,"column":3,"offset":657},"end":{"line":61,"column":16,"offset":670},"indent":[]}}],"position":{"start":{"line":61,"column":3,"offset":657},"end":{"line":61,"column":16,"offset":670},"indent":[]}}],"position":{"start":{"line":61,"column":1,"offset":655},"end":{"line":61,"column":16,"offset":670},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回边实例的集合。","position":{"start":{"line":62,"column":3,"offset":673},"end":{"line":62,"column":12,"offset":682},"indent":[]}}],"position":{"start":{"line":62,"column":3,"offset":673},"end":{"line":62,"column":12,"offset":682},"indent":[]}}],"position":{"start":{"line":62,"column":1,"offset":671},"end":{"line":62,"column":12,"offset":682},"indent":[]}}],"position":{"start":{"line":61,"column":1,"offset":655},"end":{"line":62,"column":12,"offset":682},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":65,"column":3,"offset":687},"end":{"line":65,"column":5,"offset":689},"indent":[]}}],"position":{"start":{"line":65,"column":1,"offset":685},"end":{"line":65,"column":7,"offset":691},"indent":[]}}],"position":{"start":{"line":65,"column":1,"offset":685},"end":{"line":65,"column":7,"offset":691},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token comment\">// 获取与node关联的所有边</span>\n<span class=\"token keyword\">const</span> edges <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getEdges</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":66,"column":1,"offset":692},"end":{"line":69,"column":4,"offset":756},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getinedges","title":null,"children":[],"data":{"hProperties":{"aria-label":"getinedges permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getInEdges()","position":{"start":{"line":72,"column":4,"offset":762},"end":{"line":72,"column":16,"offset":774},"indent":[]}}],"position":{"start":{"line":72,"column":1,"offset":759},"end":{"line":72,"column":16,"offset":774},"indent":[]},"data":{"id":"getinedges","htmlAttributes":{"id":"getinedges"},"hProperties":{"id":"getinedges"}}},{"type":"paragraph","children":[{"type":"text","value":"获取与当前节点关联的所有入边。","position":{"start":{"line":73,"column":1,"offset":775},"end":{"line":73,"column":16,"offset":790},"indent":[]}}],"position":{"start":{"line":73,"column":1,"offset":775},"end":{"line":73,"column":16,"offset":790},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":76,"column":3,"offset":795},"end":{"line":76,"column":6,"offset":798},"indent":[]}}],"position":{"start":{"line":76,"column":1,"offset":793},"end":{"line":76,"column":8,"offset":800},"indent":[]}}],"position":{"start":{"line":76,"column":1,"offset":793},"end":{"line":76,"column":8,"offset":800},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:Edge[];","position":{"start":{"line":78,"column":3,"offset":804},"end":{"line":78,"column":16,"offset":817},"indent":[]}}],"position":{"start":{"line":78,"column":3,"offset":804},"end":{"line":78,"column":16,"offset":817},"indent":[]}}],"position":{"start":{"line":78,"column":1,"offset":802},"end":{"line":78,"column":16,"offset":817},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回入边实例的集合。","position":{"start":{"line":79,"column":3,"offset":820},"end":{"line":79,"column":13,"offset":830},"indent":[]}}],"position":{"start":{"line":79,"column":3,"offset":820},"end":{"line":79,"column":13,"offset":830},"indent":[]}}],"position":{"start":{"line":79,"column":1,"offset":818},"end":{"line":79,"column":13,"offset":830},"indent":[]}}],"position":{"start":{"line":78,"column":1,"offset":802},"end":{"line":79,"column":13,"offset":830},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":82,"column":3,"offset":835},"end":{"line":82,"column":5,"offset":837},"indent":[]}}],"position":{"start":{"line":82,"column":1,"offset":833},"end":{"line":82,"column":7,"offset":839},"indent":[]}}],"position":{"start":{"line":82,"column":1,"offset":833},"end":{"line":82,"column":7,"offset":839},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token comment\">// 获取与node关联的所有入边</span>\n<span class=\"token keyword\">const</span> edges <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getInEdges</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":83,"column":1,"offset":840},"end":{"line":86,"column":4,"offset":907},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getoutedges","title":null,"children":[],"data":{"hProperties":{"aria-label":"getoutedges permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getOutEdges()","position":{"start":{"line":89,"column":4,"offset":913},"end":{"line":89,"column":17,"offset":926},"indent":[]}}],"position":{"start":{"line":89,"column":1,"offset":910},"end":{"line":89,"column":17,"offset":926},"indent":[]},"data":{"id":"getoutedges","htmlAttributes":{"id":"getoutedges"},"hProperties":{"id":"getoutedges"}}},{"type":"paragraph","children":[{"type":"text","value":"获取与当前节点关联的所有出边。","position":{"start":{"line":90,"column":1,"offset":927},"end":{"line":90,"column":16,"offset":942},"indent":[]}}],"position":{"start":{"line":90,"column":1,"offset":927},"end":{"line":90,"column":16,"offset":942},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":93,"column":3,"offset":947},"end":{"line":93,"column":6,"offset":950},"indent":[]}}],"position":{"start":{"line":93,"column":1,"offset":945},"end":{"line":93,"column":8,"offset":952},"indent":[]}}],"position":{"start":{"line":93,"column":1,"offset":945},"end":{"line":93,"column":8,"offset":952},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:Edge[];","position":{"start":{"line":95,"column":3,"offset":956},"end":{"line":95,"column":16,"offset":969},"indent":[]}}],"position":{"start":{"line":95,"column":3,"offset":956},"end":{"line":95,"column":16,"offset":969},"indent":[]}}],"position":{"start":{"line":95,"column":1,"offset":954},"end":{"line":95,"column":16,"offset":969},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回出边实例的集合。","position":{"start":{"line":96,"column":3,"offset":972},"end":{"line":96,"column":13,"offset":982},"indent":[]}}],"position":{"start":{"line":96,"column":3,"offset":972},"end":{"line":96,"column":13,"offset":982},"indent":[]}}],"position":{"start":{"line":96,"column":1,"offset":970},"end":{"line":96,"column":13,"offset":982},"indent":[]}}],"position":{"start":{"line":95,"column":1,"offset":954},"end":{"line":96,"column":13,"offset":982},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":99,"column":3,"offset":987},"end":{"line":99,"column":5,"offset":989},"indent":[]}}],"position":{"start":{"line":99,"column":1,"offset":985},"end":{"line":99,"column":7,"offset":991},"indent":[]}}],"position":{"start":{"line":99,"column":1,"offset":985},"end":{"line":99,"column":7,"offset":991},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token comment\">// 获取与node关联的所有出边</span>\n<span class=\"token keyword\">const</span> edges <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getOutEdges</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":100,"column":1,"offset":992},"end":{"line":103,"column":4,"offset":1060},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getanchorpoints","title":null,"children":[],"data":{"hProperties":{"aria-label":"getanchorpoints permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getAnchorPoints()","position":{"start":{"line":106,"column":4,"offset":1066},"end":{"line":106,"column":21,"offset":1083},"indent":[]}}],"position":{"start":{"line":106,"column":1,"offset":1063},"end":{"line":106,"column":21,"offset":1083},"indent":[]},"data":{"id":"getanchorpoints","htmlAttributes":{"id":"getanchorpoints"},"hProperties":{"id":"getanchorpoints"}}},{"type":"paragraph","children":[{"type":"text","value":"获取节点上面定义的锚点。","position":{"start":{"line":107,"column":1,"offset":1084},"end":{"line":107,"column":13,"offset":1096},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":1084},"end":{"line":107,"column":13,"offset":1096},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":110,"column":3,"offset":1101},"end":{"line":110,"column":6,"offset":1104},"indent":[]}}],"position":{"start":{"line":110,"column":1,"offset":1099},"end":{"line":110,"column":8,"offset":1106},"indent":[]}}],"position":{"start":{"line":110,"column":1,"offset":1099},"end":{"line":110,"column":8,"offset":1106},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:array;","position":{"start":{"line":112,"column":3,"offset":1110},"end":{"line":112,"column":15,"offset":1122},"indent":[]}}],"position":{"start":{"line":112,"column":3,"offset":1110},"end":{"line":112,"column":15,"offset":1122},"indent":[]}}],"position":{"start":{"line":112,"column":1,"offset":1108},"end":{"line":112,"column":15,"offset":1122},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值的数据结构:","position":{"start":{"line":113,"column":3,"offset":1125},"end":{"line":113,"column":12,"offset":1134},"indent":[]}}],"position":{"start":{"line":113,"column":3,"offset":1125},"end":{"line":113,"column":12,"offset":1134},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token punctuation\">[</span>\n  <span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    x<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span>\n    y<span class=\"token punctuation\">:</span> <span class=\"token number\">105</span><span class=\"token punctuation\">,</span>\n    index<span class=\"token punctuation\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">(</span><span class=\"token number\">1</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    x<span class=\"token punctuation\">:</span> <span class=\"token number\">200</span><span class=\"token punctuation\">,</span>\n    y<span class=\"token punctuation\">:</span> <span class=\"token number\">105</span><span class=\"token punctuation\">,</span>\n    index<span class=\"token punctuation\">:</span> <span class=\"token number\">1</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":114,"column":1,"offset":1135},"end":{"line":127,"column":4,"offset":1295},"indent":[1,5,5,5,5,5,5,5,5,5,5,1,1]}}],"position":{"start":{"line":113,"column":1,"offset":1123},"end":{"line":127,"column":4,"offset":1295},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1]}}],"position":{"start":{"line":112,"column":1,"offset":1108},"end":{"line":127,"column":4,"offset":1295},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":130,"column":3,"offset":1300},"end":{"line":130,"column":5,"offset":1302},"indent":[]}}],"position":{"start":{"line":130,"column":1,"offset":1298},"end":{"line":130,"column":7,"offset":1304},"indent":[]}}],"position":{"start":{"line":130,"column":1,"offset":1298},"end":{"line":130,"column":7,"offset":1304},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token comment\">// 获取定义在节点上的锚点数据</span>\n<span class=\"token keyword\">const</span> anchor <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getAnchorPoints</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":131,"column":1,"offset":1305},"end":{"line":134,"column":4,"offset":1377},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getlinkpointpoint","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlinkpointpoint permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getLinkPoint(point)","position":{"start":{"line":137,"column":4,"offset":1383},"end":{"line":137,"column":23,"offset":1402},"indent":[]}}],"position":{"start":{"line":137,"column":1,"offset":1380},"end":{"line":137,"column":23,"offset":1402},"indent":[]},"data":{"id":"getlinkpointpoint","htmlAttributes":{"id":"getlinkpointpoint"},"hProperties":{"id":"getlinkpointpoint"}}},{"type":"paragraph","children":[{"type":"text","value":"获取距离指定坐标最近的一个锚点。","position":{"start":{"line":138,"column":1,"offset":1403},"end":{"line":138,"column":17,"offset":1419},"indent":[]}}],"position":{"start":{"line":138,"column":1,"offset":1403},"end":{"line":138,"column":17,"offset":1419},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":141,"column":3,"offset":1424},"end":{"line":141,"column":5,"offset":1426},"indent":[]}}],"position":{"start":{"line":141,"column":1,"offset":1422},"end":{"line":141,"column":7,"offset":1428},"indent":[]}}],"position":{"start":{"line":141,"column":1,"offset":1422},"end":{"line":141,"column":7,"offset":1428},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":143,"column":3,"offset":1432},"end":{"line":143,"column":5,"offset":1434},"indent":[]}}],"position":{"start":{"line":143,"column":3,"offset":1432},"end":{"line":143,"column":5,"offset":1434},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":143,"column":8,"offset":1437},"end":{"line":143,"column":10,"offset":1439},"indent":[]}}],"position":{"start":{"line":143,"column":8,"offset":1437},"end":{"line":143,"column":10,"offset":1439},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否必选","position":{"start":{"line":143,"column":13,"offset":1442},"end":{"line":143,"column":17,"offset":1446},"indent":[]}}],"position":{"start":{"line":143,"column":13,"offset":1442},"end":{"line":143,"column":17,"offset":1446},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描述","position":{"start":{"line":143,"column":20,"offset":1449},"end":{"line":143,"column":22,"offset":1451},"indent":[]}}],"position":{"start":{"line":143,"column":20,"offset":1449},"end":{"line":143,"column":22,"offset":1451},"indent":[]}}],"position":{"start":{"line":143,"column":1,"offset":1430},"end":{"line":143,"column":24,"offset":1453},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"point","position":{"start":{"line":145,"column":3,"offset":1482},"end":{"line":145,"column":8,"offset":1487},"indent":[]}}],"position":{"start":{"line":145,"column":3,"offset":1482},"end":{"line":145,"column":8,"offset":1487},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"object","position":{"start":{"line":145,"column":11,"offset":1490},"end":{"line":145,"column":17,"offset":1496},"indent":[]}}],"position":{"start":{"line":145,"column":11,"offset":1490},"end":{"line":145,"column":17,"offset":1496},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"true","position":{"start":{"line":145,"column":20,"offset":1499},"end":{"line":145,"column":24,"offset":1503},"indent":[]}}],"position":{"start":{"line":145,"column":20,"offset":1499},"end":{"line":145,"column":24,"offset":1503},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"节点外部的一个点,用于计算交点及最近的锚点","position":{"start":{"line":145,"column":27,"offset":1506},"end":{"line":145,"column":48,"offset":1527},"indent":[]}}],"position":{"start":{"line":145,"column":27,"offset":1506},"end":{"line":145,"column":48,"offset":1527},"indent":[]}}],"position":{"start":{"line":145,"column":1,"offset":1480},"end":{"line":145,"column":50,"offset":1529},"indent":[]}}],"position":{"start":{"line":143,"column":1,"offset":1430},"end":{"line":145,"column":50,"offset":1529},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":149,"column":3,"offset":1535},"end":{"line":149,"column":6,"offset":1538},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":1533},"end":{"line":149,"column":8,"offset":1540},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":1533},"end":{"line":149,"column":8,"offset":1540},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:object;","position":{"start":{"line":151,"column":3,"offset":1544},"end":{"line":151,"column":16,"offset":1557},"indent":[]}}],"position":{"start":{"line":151,"column":3,"offset":1544},"end":{"line":151,"column":16,"offset":1557},"indent":[]}}],"position":{"start":{"line":151,"column":1,"offset":1542},"end":{"line":151,"column":16,"offset":1557},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值表示连接点的坐标(x, y),如果没有合适的锚点和连接点,则返回中心点。","position":{"start":{"line":152,"column":3,"offset":1560},"end":{"line":152,"column":42,"offset":1599},"indent":[]}}],"position":{"start":{"line":152,"column":3,"offset":1560},"end":{"line":152,"column":42,"offset":1599},"indent":[]}}],"position":{"start":{"line":152,"column":1,"offset":1558},"end":{"line":152,"column":42,"offset":1599},"indent":[]}}],"position":{"start":{"line":151,"column":1,"offset":1542},"end":{"line":152,"column":42,"offset":1599},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":155,"column":3,"offset":1604},"end":{"line":155,"column":5,"offset":1606},"indent":[]}}],"position":{"start":{"line":155,"column":1,"offset":1602},"end":{"line":155,"column":7,"offset":1608},"indent":[]}}],"position":{"start":{"line":155,"column":1,"offset":1602},"end":{"line":155,"column":7,"offset":1608},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> point <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  x<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span>\n  y<span class=\"token punctuation\">:</span> <span class=\"token number\">105</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token comment\">// 获取连接点</span>\n<span class=\"token keyword\">const</span> linkPoint <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getLinkPoint</span><span class=\"token punctuation\">(</span>point<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":156,"column":1,"offset":1609},"end":{"line":163,"column":4,"offset":1714},"indent":[1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#getlinkpointbyanchorindex","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlinkpointbyanchorindex permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"getLinkPointByAnchor(index)","position":{"start":{"line":167,"column":4,"offset":1721},"end":{"line":167,"column":31,"offset":1748},"indent":[]}}],"position":{"start":{"line":167,"column":1,"offset":1718},"end":{"line":167,"column":31,"offset":1748},"indent":[]},"data":{"id":"getlinkpointbyanchorindex","htmlAttributes":{"id":"getlinkpointbyanchorindex"},"hProperties":{"id":"getlinkpointbyanchorindex"}}},{"type":"paragraph","children":[{"type":"text","value":"根据锚点索引获取连接点的x、y坐标。","position":{"start":{"line":168,"column":1,"offset":1749},"end":{"line":168,"column":19,"offset":1767},"indent":[]}}],"position":{"start":{"line":168,"column":1,"offset":1749},"end":{"line":168,"column":19,"offset":1767},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":171,"column":3,"offset":1772},"end":{"line":171,"column":5,"offset":1774},"indent":[]}}],"position":{"start":{"line":171,"column":1,"offset":1770},"end":{"line":171,"column":7,"offset":1776},"indent":[]}}],"position":{"start":{"line":171,"column":1,"offset":1770},"end":{"line":171,"column":7,"offset":1776},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":173,"column":3,"offset":1780},"end":{"line":173,"column":5,"offset":1782},"indent":[]}}],"position":{"start":{"line":173,"column":3,"offset":1780},"end":{"line":173,"column":5,"offset":1782},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":173,"column":8,"offset":1785},"end":{"line":173,"column":10,"offset":1787},"indent":[]}}],"position":{"start":{"line":173,"column":8,"offset":1785},"end":{"line":173,"column":10,"offset":1787},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否必选","position":{"start":{"line":173,"column":13,"offset":1790},"end":{"line":173,"column":17,"offset":1794},"indent":[]}}],"position":{"start":{"line":173,"column":13,"offset":1790},"end":{"line":173,"column":17,"offset":1794},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描述","position":{"start":{"line":173,"column":20,"offset":1797},"end":{"line":173,"column":22,"offset":1799},"indent":[]}}],"position":{"start":{"line":173,"column":20,"offset":1797},"end":{"line":173,"column":22,"offset":1799},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":1778},"end":{"line":173,"column":24,"offset":1801},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"index","position":{"start":{"line":175,"column":3,"offset":1830},"end":{"line":175,"column":8,"offset":1835},"indent":[]}}],"position":{"start":{"line":175,"column":3,"offset":1830},"end":{"line":175,"column":8,"offset":1835},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"number","position":{"start":{"line":175,"column":11,"offset":1838},"end":{"line":175,"column":17,"offset":1844},"indent":[]}}],"position":{"start":{"line":175,"column":11,"offset":1838},"end":{"line":175,"column":17,"offset":1844},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"true","position":{"start":{"line":175,"column":20,"offset":1847},"end":{"line":175,"column":24,"offset":1851},"indent":[]}}],"position":{"start":{"line":175,"column":20,"offset":1847},"end":{"line":175,"column":24,"offset":1851},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"锚点的索引","position":{"start":{"line":175,"column":27,"offset":1854},"end":{"line":175,"column":32,"offset":1859},"indent":[]}}],"position":{"start":{"line":175,"column":27,"offset":1854},"end":{"line":175,"column":32,"offset":1859},"indent":[]}}],"position":{"start":{"line":175,"column":1,"offset":1828},"end":{"line":175,"column":34,"offset":1861},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":1778},"end":{"line":175,"column":34,"offset":1861},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"返回值","position":{"start":{"line":179,"column":3,"offset":1867},"end":{"line":179,"column":6,"offset":1870},"indent":[]}}],"position":{"start":{"line":179,"column":1,"offset":1865},"end":{"line":179,"column":8,"offset":1872},"indent":[]}}],"position":{"start":{"line":179,"column":1,"offset":1865},"end":{"line":179,"column":8,"offset":1872},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值类型:object;","position":{"start":{"line":181,"column":3,"offset":1876},"end":{"line":181,"column":16,"offset":1889},"indent":[]}}],"position":{"start":{"line":181,"column":3,"offset":1876},"end":{"line":181,"column":16,"offset":1889},"indent":[]}}],"position":{"start":{"line":181,"column":1,"offset":1874},"end":{"line":181,"column":16,"offset":1889},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"返回值表示连接点的坐标(x, y)。","position":{"start":{"line":182,"column":3,"offset":1892},"end":{"line":182,"column":21,"offset":1910},"indent":[]}}],"position":{"start":{"line":182,"column":3,"offset":1892},"end":{"line":182,"column":21,"offset":1910},"indent":[]}}],"position":{"start":{"line":182,"column":1,"offset":1890},"end":{"line":182,"column":21,"offset":1910},"indent":[]}}],"position":{"start":{"line":181,"column":1,"offset":1874},"end":{"line":182,"column":21,"offset":1910},"indent":[1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":185,"column":3,"offset":1915},"end":{"line":185,"column":5,"offset":1917},"indent":[]}}],"position":{"start":{"line":185,"column":1,"offset":1913},"end":{"line":185,"column":7,"offset":1919},"indent":[]}}],"position":{"start":{"line":185,"column":1,"offset":1913},"end":{"line":185,"column":7,"offset":1919},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token comment\">// 获取定义在节点上的第一个锚点</span>\n<span class=\"token keyword\">const</span> anchor <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">getLinkPointByAnchor</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":186,"column":1,"offset":1920},"end":{"line":189,"column":4,"offset":1999},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#addedgeedge","title":null,"children":[],"data":{"hProperties":{"aria-label":"addedgeedge permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"addEdge(edge)","position":{"start":{"line":191,"column":4,"offset":2004},"end":{"line":191,"column":17,"offset":2017},"indent":[]}}],"position":{"start":{"line":191,"column":1,"offset":2001},"end":{"line":191,"column":17,"offset":2017},"indent":[]},"data":{"id":"addedgeedge","htmlAttributes":{"id":"addedgeedge"},"hProperties":{"id":"addedgeedge"}}},{"type":"paragraph","children":[{"type":"text","value":"添加指定的边到当前节点上。","position":{"start":{"line":192,"column":1,"offset":2018},"end":{"line":192,"column":14,"offset":2031},"indent":[]}}],"position":{"start":{"line":192,"column":1,"offset":2018},"end":{"line":192,"column":14,"offset":2031},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":195,"column":3,"offset":2036},"end":{"line":195,"column":5,"offset":2038},"indent":[]}}],"position":{"start":{"line":195,"column":1,"offset":2034},"end":{"line":195,"column":7,"offset":2040},"indent":[]}}],"position":{"start":{"line":195,"column":1,"offset":2034},"end":{"line":195,"column":7,"offset":2040},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":197,"column":3,"offset":2044},"end":{"line":197,"column":5,"offset":2046},"indent":[]}}],"position":{"start":{"line":197,"column":3,"offset":2044},"end":{"line":197,"column":5,"offset":2046},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":197,"column":8,"offset":2049},"end":{"line":197,"column":10,"offset":2051},"indent":[]}}],"position":{"start":{"line":197,"column":8,"offset":2049},"end":{"line":197,"column":10,"offset":2051},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否必选","position":{"start":{"line":197,"column":13,"offset":2054},"end":{"line":197,"column":17,"offset":2058},"indent":[]}}],"position":{"start":{"line":197,"column":13,"offset":2054},"end":{"line":197,"column":17,"offset":2058},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描述","position":{"start":{"line":197,"column":20,"offset":2061},"end":{"line":197,"column":22,"offset":2063},"indent":[]}}],"position":{"start":{"line":197,"column":20,"offset":2061},"end":{"line":197,"column":22,"offset":2063},"indent":[]}}],"position":{"start":{"line":197,"column":1,"offset":2042},"end":{"line":197,"column":24,"offset":2065},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"edge","position":{"start":{"line":199,"column":3,"offset":2094},"end":{"line":199,"column":7,"offset":2098},"indent":[]}}],"position":{"start":{"line":199,"column":3,"offset":2094},"end":{"line":199,"column":7,"offset":2098},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Edge","position":{"start":{"line":199,"column":10,"offset":2101},"end":{"line":199,"column":14,"offset":2105},"indent":[]}}],"position":{"start":{"line":199,"column":10,"offset":2101},"end":{"line":199,"column":14,"offset":2105},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"true","position":{"start":{"line":199,"column":17,"offset":2108},"end":{"line":199,"column":21,"offset":2112},"indent":[]}}],"position":{"start":{"line":199,"column":17,"offset":2108},"end":{"line":199,"column":21,"offset":2112},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Edge实例","position":{"start":{"line":199,"column":24,"offset":2115},"end":{"line":199,"column":30,"offset":2121},"indent":[]}}],"position":{"start":{"line":199,"column":24,"offset":2115},"end":{"line":199,"column":30,"offset":2121},"indent":[]}}],"position":{"start":{"line":199,"column":1,"offset":2092},"end":{"line":199,"column":32,"offset":2123},"indent":[]}}],"position":{"start":{"line":197,"column":1,"offset":2042},"end":{"line":199,"column":32,"offset":2123},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":203,"column":3,"offset":2129},"end":{"line":203,"column":5,"offset":2131},"indent":[]}}],"position":{"start":{"line":203,"column":1,"offset":2127},"end":{"line":203,"column":7,"offset":2133},"indent":[]}}],"position":{"start":{"line":203,"column":1,"offset":2127},"end":{"line":203,"column":7,"offset":2133},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> edge <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">Edge</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// TODO</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\nnode<span class=\"token punctuation\">.</span><span class=\"token function\">addEdge</span><span class=\"token punctuation\">(</span>edge<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":204,"column":1,"offset":2134},"end":{"line":209,"column":4,"offset":2206},"indent":[1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#removeedgeedge","title":null,"children":[],"data":{"hProperties":{"aria-label":"removeedgeedge permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"removeEdge(edge)","position":{"start":{"line":212,"column":4,"offset":2212},"end":{"line":212,"column":20,"offset":2228},"indent":[]}}],"position":{"start":{"line":212,"column":1,"offset":2209},"end":{"line":212,"column":20,"offset":2228},"indent":[]},"data":{"id":"removeedgeedge","htmlAttributes":{"id":"removeedgeedge"},"hProperties":{"id":"removeedgeedge"}}},{"type":"paragraph","children":[{"type":"text","value":"移除与当前节点相关的指定边。","position":{"start":{"line":213,"column":1,"offset":2229},"end":{"line":213,"column":15,"offset":2243},"indent":[]}}],"position":{"start":{"line":213,"column":1,"offset":2229},"end":{"line":213,"column":15,"offset":2243},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":216,"column":3,"offset":2248},"end":{"line":216,"column":5,"offset":2250},"indent":[]}}],"position":{"start":{"line":216,"column":1,"offset":2246},"end":{"line":216,"column":7,"offset":2252},"indent":[]}}],"position":{"start":{"line":216,"column":1,"offset":2246},"end":{"line":216,"column":7,"offset":2252},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":218,"column":3,"offset":2256},"end":{"line":218,"column":5,"offset":2258},"indent":[]}}],"position":{"start":{"line":218,"column":3,"offset":2256},"end":{"line":218,"column":5,"offset":2258},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":218,"column":8,"offset":2261},"end":{"line":218,"column":10,"offset":2263},"indent":[]}}],"position":{"start":{"line":218,"column":8,"offset":2261},"end":{"line":218,"column":10,"offset":2263},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否必选","position":{"start":{"line":218,"column":13,"offset":2266},"end":{"line":218,"column":17,"offset":2270},"indent":[]}}],"position":{"start":{"line":218,"column":13,"offset":2266},"end":{"line":218,"column":17,"offset":2270},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描述","position":{"start":{"line":218,"column":20,"offset":2273},"end":{"line":218,"column":22,"offset":2275},"indent":[]}}],"position":{"start":{"line":218,"column":20,"offset":2273},"end":{"line":218,"column":22,"offset":2275},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2254},"end":{"line":218,"column":24,"offset":2277},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"edge","position":{"start":{"line":220,"column":3,"offset":2306},"end":{"line":220,"column":7,"offset":2310},"indent":[]}}],"position":{"start":{"line":220,"column":3,"offset":2306},"end":{"line":220,"column":7,"offset":2310},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Edge","position":{"start":{"line":220,"column":10,"offset":2313},"end":{"line":220,"column":14,"offset":2317},"indent":[]}}],"position":{"start":{"line":220,"column":10,"offset":2313},"end":{"line":220,"column":14,"offset":2317},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"true","position":{"start":{"line":220,"column":17,"offset":2320},"end":{"line":220,"column":21,"offset":2324},"indent":[]}}],"position":{"start":{"line":220,"column":17,"offset":2320},"end":{"line":220,"column":21,"offset":2324},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Edge实例","position":{"start":{"line":220,"column":24,"offset":2327},"end":{"line":220,"column":30,"offset":2333},"indent":[]}}],"position":{"start":{"line":220,"column":24,"offset":2327},"end":{"line":220,"column":30,"offset":2333},"indent":[]}}],"position":{"start":{"line":220,"column":1,"offset":2304},"end":{"line":220,"column":32,"offset":2335},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2254},"end":{"line":220,"column":32,"offset":2335},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":224,"column":3,"offset":2341},"end":{"line":224,"column":5,"offset":2343},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":2339},"end":{"line":224,"column":7,"offset":2345},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":2339},"end":{"line":224,"column":7,"offset":2345},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> edge <span class=\"token operator\">=</span> node<span class=\"token punctuation\">.</span><span class=\"token function\">removeEdge</span><span class=\"token punctuation\">(</span>edge<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span> <span class=\"token comment\">// TODO</span>\n</code></pre></div>","position":{"start":{"line":225,"column":1,"offset":2346},"end":{"line":228,"column":4,"offset":2406},"indent":[1,1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":229,"column":1,"offset":2407}}}}