UNPKG

@antv/g6

Version:

graph visualization frame work

1 lines 77.2 kB
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-d96c9a48d44c2776edd786abcc01aac5-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Group 类似于 ","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":11,"offset":11},"indent":[]}},{"type":"link","title":null,"url":"https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/g","children":[{"type":"text","value":"SVG 中的 ","position":{"start":{"line":2,"column":12,"offset":12},"end":{"line":2,"column":19,"offset":19},"indent":[]}}],"position":{"start":{"line":2,"column":11,"offset":11},"end":{"line":2,"column":80,"offset":80},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"link","title":null,"url":"https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/g","children":[{"type":"html","value":"<code class=\"language-text\">&lt;g&gt;</code>","position":{"start":{"line":2,"column":81,"offset":81},"end":{"line":2,"column":86,"offset":86},"indent":[]}}],"position":{"start":{"line":2,"column":80,"offset":80},"end":{"line":2,"column":147,"offset":147},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"link","title":null,"url":"https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/g","children":[{"type":"text","value":" 标签","position":{"start":{"line":2,"column":148,"offset":148},"end":{"line":2,"column":151,"offset":151},"indent":[]}}],"position":{"start":{"line":2,"column":147,"offset":147},"end":{"line":2,"column":212,"offset":212},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":":元素 ","position":{"start":{"line":2,"column":212,"offset":212},"end":{"line":2,"column":216,"offset":216},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">g</code>","position":{"start":{"line":2,"column":216,"offset":216},"end":{"line":2,"column":219,"offset":219},"indent":[]}},{"type":"text","value":" 是用来组合图形对象的容器。在 group 上添加变换(例如剪裁、旋转、放缩、平移等)会应用到其所有的子元素上。在 group 上添加属性(例如颜色、位置等)会被其所有的子元素继承。此外, group 可以多层嵌套使用,因此可以用来定义复杂的对象。关于 Group 更详细的介绍请参考《","position":{"start":{"line":2,"column":219,"offset":219},"end":{"line":2,"column":362,"offset":362},"indent":[]}},{"type":"link","title":null,"url":"../manual/middle/nodeGroup","children":[{"type":"text","value":"图形分组 Group","position":{"start":{"line":2,"column":363,"offset":363},"end":{"line":2,"column":373,"offset":373},"indent":[]}}],"position":{"start":{"line":2,"column":362,"offset":362},"end":{"line":2,"column":402,"offset":402},"indent":[]}},{"type":"text","value":"》。","position":{"start":{"line":2,"column":402,"offset":402},"end":{"line":2,"column":404,"offset":404},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":404,"offset":404},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#声明实例","title":null,"children":[],"data":{"hProperties":{"aria-label":"声明实例 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":"声明实例","position":{"start":{"line":5,"column":4,"offset":410},"end":{"line":5,"column":8,"offset":414},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":407},"end":{"line":5,"column":8,"offset":414},"indent":[]},"data":{"id":"声明实例","htmlAttributes":{"id":"声明实例"},"hProperties":{"id":"声明实例"}}},{"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> group <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">Group</span><span class=\"token punctuation\">(</span>cfgs<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":6,"column":1,"offset":415},"end":{"line":8,"column":4,"offset":463},"indent":[1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#实例方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"实例方法 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":"实例方法","position":{"start":{"line":11,"column":4,"offset":469},"end":{"line":11,"column":8,"offset":473},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":466},"end":{"line":11,"column":8,"offset":473},"indent":[]},"data":{"id":"实例方法","htmlAttributes":{"id":"实例方法"},"hProperties":{"id":"实例方法"}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#addgroupparam-cfg","title":null,"children":[],"data":{"hProperties":{"aria-label":"addgroupparam cfg 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":"addGroup(param, cfg)","position":{"start":{"line":14,"column":5,"offset":480},"end":{"line":14,"column":25,"offset":500},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":476},"end":{"line":14,"column":25,"offset":500},"indent":[]},"data":{"id":"addgroupparam-cfg","htmlAttributes":{"id":"addgroupparam-cfg"},"hProperties":{"id":"addgroupparam-cfg"}}},{"type":"paragraph","children":[{"type":"text","value":"向分组中添加新的分组。","position":{"start":{"line":15,"column":1,"offset":501},"end":{"line":15,"column":12,"offset":512},"indent":[]}}],"position":{"start":{"line":15,"column":1,"offset":501},"end":{"line":15,"column":12,"offset":512},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":18,"column":3,"offset":517},"end":{"line":18,"column":5,"offset":519},"indent":[]}}],"position":{"start":{"line":18,"column":1,"offset":515},"end":{"line":18,"column":7,"offset":521},"indent":[]}}],"position":{"start":{"line":18,"column":1,"offset":515},"end":{"line":18,"column":7,"offset":521},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":20,"column":3,"offset":525},"end":{"line":20,"column":5,"offset":527},"indent":[]}}],"position":{"start":{"line":20,"column":3,"offset":525},"end":{"line":20,"column":5,"offset":527},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":20,"column":8,"offset":530},"end":{"line":20,"column":10,"offset":532},"indent":[]}}],"position":{"start":{"line":20,"column":8,"offset":530},"end":{"line":20,"column":10,"offset":532},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":20,"column":13,"offset":535},"end":{"line":20,"column":15,"offset":537},"indent":[]}}],"position":{"start":{"line":20,"column":13,"offset":535},"end":{"line":20,"column":15,"offset":537},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":523},"end":{"line":20,"column":17,"offset":539},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"param","position":{"start":{"line":22,"column":3,"offset":562},"end":{"line":22,"column":8,"offset":567},"indent":[]}}],"position":{"start":{"line":22,"column":3,"offset":562},"end":{"line":22,"column":8,"offset":567},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Function","position":{"start":{"line":22,"column":11,"offset":570},"end":{"line":22,"column":19,"offset":578},"indent":[]}}],"position":{"start":{"line":22,"column":11,"offset":570},"end":{"line":22,"column":19,"offset":578},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":22,"column":22,"offset":581},"end":{"line":22,"column":28,"offset":587},"indent":[]}}],"position":{"start":{"line":22,"column":22,"offset":581},"end":{"line":22,"column":28,"offset":587},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"undefined","position":{"start":{"line":22,"column":31,"offset":590},"end":{"line":22,"column":40,"offset":599},"indent":[]}}],"position":{"start":{"line":22,"column":31,"offset":590},"end":{"line":22,"column":40,"offset":599},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":22,"column":44,"offset":603},"end":{"line":22,"column":44,"offset":603},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":560},"end":{"line":22,"column":45,"offset":604},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"cfg","position":{"start":{"line":23,"column":3,"offset":607},"end":{"line":23,"column":6,"offset":610},"indent":[]}}],"position":{"start":{"line":23,"column":3,"offset":607},"end":{"line":23,"column":6,"offset":610},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":23,"column":9,"offset":613},"end":{"line":23,"column":15,"offset":619},"indent":[]}}],"position":{"start":{"line":23,"column":9,"offset":613},"end":{"line":23,"column":15,"offset":619},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":23,"column":19,"offset":623},"end":{"line":23,"column":19,"offset":623},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":605},"end":{"line":23,"column":20,"offset":624},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":523},"end":{"line":23,"column":20,"offset":624},"indent":[1,1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":27,"column":3,"offset":630},"end":{"line":27,"column":5,"offset":632},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":628},"end":{"line":27,"column":7,"offset":634},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":628},"end":{"line":27,"column":7,"offset":634},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">group<span class=\"token punctuation\">.</span><span class=\"token function\">addGroup</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  id<span class=\"token punctuation\">:</span> <span class=\"token string\">'groupId'</span><span class=\"token punctuation\">,</span>\n<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":636},"end":{"line":33,"column":4,"offset":688},"indent":[1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#addshapetype-cfgs","title":null,"children":[],"data":{"hProperties":{"aria-label":"addshapetype cfgs 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":"addShape(type, cfgs)","position":{"start":{"line":37,"column":5,"offset":696},"end":{"line":37,"column":25,"offset":716},"indent":[]}}],"position":{"start":{"line":37,"column":1,"offset":692},"end":{"line":37,"column":25,"offset":716},"indent":[]},"data":{"id":"addshapetype-cfgs","htmlAttributes":{"id":"addshapetype-cfgs"},"hProperties":{"id":"addshapetype-cfgs"}}},{"type":"paragraph","children":[{"type":"text","value":"向分组中添加新的图形。","position":{"start":{"line":38,"column":1,"offset":717},"end":{"line":38,"column":12,"offset":728},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":38,"column":12,"offset":728},"end":{"line":38,"column":18,"offset":734},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">注意</code>","position":{"start":{"line":38,"column":18,"offset":734},"end":{"line":38,"column":22,"offset":738},"indent":[]}},{"type":"text","value":":在分组上添加的","position":{"start":{"line":38,"column":22,"offset":738},"end":{"line":38,"column":30,"offset":746},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">clip</code>","position":{"start":{"line":38,"column":30,"offset":746},"end":{"line":38,"column":36,"offset":752},"indent":[]}},{"type":"text","value":", ","position":{"start":{"line":38,"column":36,"offset":752},"end":{"line":38,"column":38,"offset":754},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">transform</code>","position":{"start":{"line":38,"column":38,"offset":754},"end":{"line":38,"column":49,"offset":765},"indent":[]}},{"type":"text","value":"等会影响到该分组中的所有图形。G支持的图形及其绘图属性请见shape小节。","position":{"start":{"line":38,"column":49,"offset":765},"end":{"line":38,"column":86,"offset":802},"indent":[]}}],"position":{"start":{"line":38,"column":1,"offset":717},"end":{"line":38,"column":86,"offset":802},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":41,"column":3,"offset":807},"end":{"line":41,"column":5,"offset":809},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":805},"end":{"line":41,"column":7,"offset":811},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":805},"end":{"line":41,"column":7,"offset":811},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":43,"column":3,"offset":815},"end":{"line":43,"column":5,"offset":817},"indent":[]}}],"position":{"start":{"line":43,"column":3,"offset":815},"end":{"line":43,"column":5,"offset":817},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":43,"column":8,"offset":820},"end":{"line":43,"column":10,"offset":822},"indent":[]}}],"position":{"start":{"line":43,"column":8,"offset":820},"end":{"line":43,"column":10,"offset":822},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":43,"column":13,"offset":825},"end":{"line":43,"column":15,"offset":827},"indent":[]}}],"position":{"start":{"line":43,"column":13,"offset":825},"end":{"line":43,"column":15,"offset":827},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":813},"end":{"line":43,"column":17,"offset":829},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"type","position":{"start":{"line":45,"column":3,"offset":852},"end":{"line":45,"column":7,"offset":856},"indent":[]}}],"position":{"start":{"line":45,"column":3,"offset":852},"end":{"line":45,"column":7,"offset":856},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":45,"column":10,"offset":859},"end":{"line":45,"column":16,"offset":865},"indent":[]}}],"position":{"start":{"line":45,"column":10,"offset":859},"end":{"line":45,"column":16,"offset":865},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"图元素类型,值可以为:rect、circle、fan、ellipse、marker、image等,具体参考","position":{"start":{"line":45,"column":19,"offset":868},"end":{"line":45,"column":72,"offset":921},"indent":[]}},{"type":"link","title":null,"url":"https://www.yuque.com/antv/g6/ffzwfp","children":[{"type":"text","value":"支持的Shape类型及属性","position":{"start":{"line":45,"column":73,"offset":922},"end":{"line":45,"column":86,"offset":935},"indent":[]}}],"position":{"start":{"line":45,"column":72,"offset":921},"end":{"line":45,"column":125,"offset":974},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}}],"position":{"start":{"line":45,"column":19,"offset":868},"end":{"line":45,"column":125,"offset":974},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":850},"end":{"line":45,"column":127,"offset":976},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"cfg","position":{"start":{"line":46,"column":3,"offset":979},"end":{"line":46,"column":6,"offset":982},"indent":[]}}],"position":{"start":{"line":46,"column":3,"offset":979},"end":{"line":46,"column":6,"offset":982},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":46,"column":9,"offset":985},"end":{"line":46,"column":15,"offset":991},"indent":[]}}],"position":{"start":{"line":46,"column":9,"offset":985},"end":{"line":46,"column":15,"offset":991},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"图元素的属性","position":{"start":{"line":46,"column":18,"offset":994},"end":{"line":46,"column":24,"offset":1000},"indent":[]}}],"position":{"start":{"line":46,"column":18,"offset":994},"end":{"line":46,"column":24,"offset":1000},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":977},"end":{"line":46,"column":26,"offset":1002},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":813},"end":{"line":46,"column":26,"offset":1002},"indent":[1,1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":49,"column":3,"offset":1007},"end":{"line":49,"column":5,"offset":1009},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1005},"end":{"line":49,"column":7,"offset":1011},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1005},"end":{"line":49,"column":7,"offset":1011},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">group<span class=\"token punctuation\">.</span><span class=\"token function\">addShape</span><span class=\"token punctuation\">(</span><span class=\"token string\">'rect'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n  attrs<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    fill<span class=\"token punctuation\">:</span> <span class=\"token string\">'red'</span><span class=\"token punctuation\">,</span>\n    shadowOffsetX<span class=\"token punctuation\">:</span> <span class=\"token number\">10</span><span class=\"token punctuation\">,</span>\n    shadowOffsetY<span class=\"token punctuation\">:</span> <span class=\"token number\">10</span><span class=\"token punctuation\">,</span>\n    shadowColor<span class=\"token punctuation\">:</span> <span class=\"token string\">'blue'</span><span class=\"token punctuation\">,</span>\n    shadowBlur<span class=\"token punctuation\">:</span> <span class=\"token number\">10</span><span class=\"token punctuation\">,</span>\n    opacity<span class=\"token punctuation\">:</span> <span class=\"token number\">0.8</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":51,"column":1,"offset":1013},"end":{"line":62,"column":4,"offset":1196},"indent":[1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#containchild","title":null,"children":[],"data":{"hProperties":{"aria-label":"containchild 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":"contain(child)","position":{"start":{"line":65,"column":5,"offset":1203},"end":{"line":65,"column":19,"offset":1217},"indent":[]}}],"position":{"start":{"line":65,"column":1,"offset":1199},"end":{"line":65,"column":19,"offset":1217},"indent":[]},"data":{"id":"containchild","htmlAttributes":{"id":"containchild"},"hProperties":{"id":"containchild"}}},{"type":"paragraph","children":[{"type":"text","value":"该分组是否包含此元素。","position":{"start":{"line":66,"column":1,"offset":1218},"end":{"line":66,"column":12,"offset":1229},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":66,"column":12,"offset":1229},"end":{"line":66,"column":18,"offset":1235},"indent":[]}},{"type":"text","value":"返回值: boolean","position":{"start":{"line":66,"column":18,"offset":1235},"end":{"line":66,"column":30,"offset":1247},"indent":[]}}],"position":{"start":{"line":66,"column":1,"offset":1218},"end":{"line":66,"column":30,"offset":1247},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":69,"column":3,"offset":1252},"end":{"line":69,"column":5,"offset":1254},"indent":[]}}],"position":{"start":{"line":69,"column":1,"offset":1250},"end":{"line":69,"column":7,"offset":1256},"indent":[]}}],"position":{"start":{"line":69,"column":1,"offset":1250},"end":{"line":69,"column":7,"offset":1256},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":71,"column":3,"offset":1260},"end":{"line":71,"column":5,"offset":1262},"indent":[]}}],"position":{"start":{"line":71,"column":3,"offset":1260},"end":{"line":71,"column":5,"offset":1262},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":71,"column":8,"offset":1265},"end":{"line":71,"column":10,"offset":1267},"indent":[]}}],"position":{"start":{"line":71,"column":8,"offset":1265},"end":{"line":71,"column":10,"offset":1267},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":71,"column":13,"offset":1270},"end":{"line":71,"column":15,"offset":1272},"indent":[]}}],"position":{"start":{"line":71,"column":13,"offset":1270},"end":{"line":71,"column":15,"offset":1272},"indent":[]}}],"position":{"start":{"line":71,"column":1,"offset":1258},"end":{"line":71,"column":17,"offset":1274},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"child","position":{"start":{"line":73,"column":3,"offset":1297},"end":{"line":73,"column":8,"offset":1302},"indent":[]}}],"position":{"start":{"line":73,"column":3,"offset":1297},"end":{"line":73,"column":8,"offset":1302},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Group","position":{"start":{"line":73,"column":11,"offset":1305},"end":{"line":73,"column":16,"offset":1310},"indent":[]}}],"position":{"start":{"line":73,"column":11,"offset":1305},"end":{"line":73,"column":16,"offset":1310},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Shape","position":{"start":{"line":73,"column":19,"offset":1313},"end":{"line":73,"column":24,"offset":1318},"indent":[]}}],"position":{"start":{"line":73,"column":19,"offset":1313},"end":{"line":73,"column":24,"offset":1318},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"子 Group 或 Shape 实例","position":{"start":{"line":73,"column":27,"offset":1321},"end":{"line":73,"column":45,"offset":1339},"indent":[]}}],"position":{"start":{"line":73,"column":27,"offset":1321},"end":{"line":73,"column":45,"offset":1339},"indent":[]}}],"position":{"start":{"line":73,"column":1,"offset":1295},"end":{"line":73,"column":47,"offset":1341},"indent":[]}}],"position":{"start":{"line":71,"column":1,"offset":1258},"end":{"line":73,"column":47,"offset":1341},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":77,"column":3,"offset":1347},"end":{"line":77,"column":5,"offset":1349},"indent":[]}}],"position":{"start":{"line":77,"column":1,"offset":1345},"end":{"line":77,"column":7,"offset":1351},"indent":[]}}],"position":{"start":{"line":77,"column":1,"offset":1345},"end":{"line":77,"column":7,"offset":1351},"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> has <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">contain</span><span class=\"token punctuation\">(</span>child<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":79,"column":1,"offset":1353},"end":{"line":81,"column":4,"offset":1403},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#findfn","title":null,"children":[],"data":{"hProperties":{"aria-label":"findfn 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":"find(fn)","position":{"start":{"line":84,"column":5,"offset":1410},"end":{"line":84,"column":13,"offset":1418},"indent":[]}}],"position":{"start":{"line":84,"column":1,"offset":1406},"end":{"line":84,"column":13,"offset":1418},"indent":[]},"data":{"id":"findfn","htmlAttributes":{"id":"findfn"},"hProperties":{"id":"findfn"}}},{"type":"paragraph","children":[{"type":"text","value":"根据指定条件返回对应元素,","position":{"start":{"line":85,"column":1,"offset":1419},"end":{"line":85,"column":14,"offset":1432},"indent":[]}},{"type":"strong","children":[{"type":"text","value":"只返回符合条件的第一个元素","position":{"start":{"line":85,"column":16,"offset":1434},"end":{"line":85,"column":29,"offset":1447},"indent":[]}}],"position":{"start":{"line":85,"column":14,"offset":1432},"end":{"line":85,"column":31,"offset":1449},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":85,"column":31,"offset":1449},"end":{"line":85,"column":32,"offset":1450},"indent":[]}}],"position":{"start":{"line":85,"column":1,"offset":1419},"end":{"line":85,"column":32,"offset":1450},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":88,"column":3,"offset":1455},"end":{"line":88,"column":5,"offset":1457},"indent":[]}}],"position":{"start":{"line":88,"column":1,"offset":1453},"end":{"line":88,"column":7,"offset":1459},"indent":[]}}],"position":{"start":{"line":88,"column":1,"offset":1453},"end":{"line":88,"column":7,"offset":1459},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":91,"column":3,"offset":1464},"end":{"line":91,"column":5,"offset":1466},"indent":[]}}],"position":{"start":{"line":91,"column":3,"offset":1464},"end":{"line":91,"column":5,"offset":1466},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":91,"column":8,"offset":1469},"end":{"line":91,"column":10,"offset":1471},"indent":[]}}],"position":{"start":{"line":91,"column":8,"offset":1469},"end":{"line":91,"column":10,"offset":1471},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":91,"column":13,"offset":1474},"end":{"line":91,"column":15,"offset":1476},"indent":[]}}],"position":{"start":{"line":91,"column":13,"offset":1474},"end":{"line":91,"column":15,"offset":1476},"indent":[]}}],"position":{"start":{"line":91,"column":1,"offset":1462},"end":{"line":91,"column":17,"offset":1478},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fn","position":{"start":{"line":93,"column":3,"offset":1501},"end":{"line":93,"column":5,"offset":1503},"indent":[]}}],"position":{"start":{"line":93,"column":3,"offset":1501},"end":{"line":93,"column":5,"offset":1503},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Function","position":{"start":{"line":93,"column":8,"offset":1506},"end":{"line":93,"column":16,"offset":1514},"indent":[]}}],"position":{"start":{"line":93,"column":8,"offset":1506},"end":{"line":93,"column":16,"offset":1514},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"自定义回调函数","position":{"start":{"line":93,"column":19,"offset":1517},"end":{"line":93,"column":26,"offset":1524},"indent":[]}}],"position":{"start":{"line":93,"column":19,"offset":1517},"end":{"line":93,"column":26,"offset":1524},"indent":[]}}],"position":{"start":{"line":93,"column":1,"offset":1499},"end":{"line":93,"column":28,"offset":1526},"indent":[]}}],"position":{"start":{"line":91,"column":1,"offset":1462},"end":{"line":93,"column":28,"offset":1526},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":97,"column":3,"offset":1532},"end":{"line":97,"column":5,"offset":1534},"indent":[]}}],"position":{"start":{"line":97,"column":1,"offset":1530},"end":{"line":97,"column":7,"offset":1536},"indent":[]}}],"position":{"start":{"line":97,"column":1,"offset":1530},"end":{"line":97,"column":7,"offset":1536},"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> child <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">find</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">function</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">item</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token keyword\">return</span> item<span class=\"token punctuation\">.</span><span class=\"token function\">attr</span><span class=\"token punctuation\">(</span><span class=\"token string\">'fill'</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">===</span> <span class=\"token string\">'red'</span><span class=\"token punctuation\">;</span> <span class=\"token comment\">// 找到首个填充为红色的图形</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":99,"column":1,"offset":1538},"end":{"line":103,"column":4,"offset":1657},"indent":[1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#findbyidid","title":null,"children":[],"data":{"hProperties":{"aria-label":"findbyidid 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":"findById(id)","position":{"start":{"line":106,"column":5,"offset":1664},"end":{"line":106,"column":17,"offset":1676},"indent":[]}}],"position":{"start":{"line":106,"column":1,"offset":1660},"end":{"line":106,"column":17,"offset":1676},"indent":[]},"data":{"id":"findbyidid","htmlAttributes":{"id":"findbyidid"},"hProperties":{"id":"findbyidid"}}},{"type":"paragraph","children":[{"type":"text","value":"根据元素ID返回对应的实例。","position":{"start":{"line":107,"column":1,"offset":1677},"end":{"line":107,"column":15,"offset":1691},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":107,"column":15,"offset":1691},"end":{"line":107,"column":21,"offset":1697},"indent":[]}},{"type":"text","value":"返回值:Object。","position":{"start":{"line":107,"column":21,"offset":1697},"end":{"line":107,"column":32,"offset":1708},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":1677},"end":{"line":107,"column":32,"offset":1708},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":110,"column":3,"offset":1713},"end":{"line":110,"column":5,"offset":1715},"indent":[]}}],"position":{"start":{"line":110,"column":1,"offset":1711},"end":{"line":110,"column":7,"offset":1717},"indent":[]}}],"position":{"start":{"line":110,"column":1,"offset":1711},"end":{"line":110,"column":7,"offset":1717},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":113,"column":3,"offset":1722},"end":{"line":113,"column":5,"offset":1724},"indent":[]}}],"position":{"start":{"line":113,"column":3,"offset":1722},"end":{"line":113,"column":5,"offset":1724},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":113,"column":8,"offset":1727},"end":{"line":113,"column":10,"offset":1729},"indent":[]}}],"position":{"start":{"line":113,"column":8,"offset":1727},"end":{"line":113,"column":10,"offset":1729},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":113,"column":13,"offset":1732},"end":{"line":113,"column":15,"offset":1734},"indent":[]}}],"position":{"start":{"line":113,"column":13,"offset":1732},"end":{"line":113,"column":15,"offset":1734},"indent":[]}}],"position":{"start":{"line":113,"column":1,"offset":1720},"end":{"line":113,"column":17,"offset":1736},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"id","position":{"start":{"line":115,"column":3,"offset":1759},"end":{"line":115,"column":5,"offset":1761},"indent":[]}}],"position":{"start":{"line":115,"column":3,"offset":1759},"end":{"line":115,"column":5,"offset":1761},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":115,"column":8,"offset":1764},"end":{"line":115,"column":14,"offset":1770},"indent":[]}}],"position":{"start":{"line":115,"column":8,"offset":1764},"end":{"line":115,"column":14,"offset":1770},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Group 实例ID","position":{"start":{"line":115,"column":17,"offset":1773},"end":{"line":115,"column":27,"offset":1783},"indent":[]}}],"position":{"start":{"line":115,"column":17,"offset":1773},"end":{"line":115,"column":27,"offset":1783},"indent":[]}}],"position":{"start":{"line":115,"column":1,"offset":1757},"end":{"line":115,"column":29,"offset":1785},"indent":[]}}],"position":{"start":{"line":113,"column":1,"offset":1720},"end":{"line":115,"column":29,"offset":1785},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":119,"column":3,"offset":1791},"end":{"line":119,"column":5,"offset":1793},"indent":[]}}],"position":{"start":{"line":119,"column":1,"offset":1789},"end":{"line":119,"column":7,"offset":1795},"indent":[]}}],"position":{"start":{"line":119,"column":1,"offset":1789},"end":{"line":119,"column":7,"offset":1795},"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> group1 <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">findById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'group1'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":121,"column":1,"offset":1797},"end":{"line":123,"column":4,"offset":1855},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#findallfn","title":null,"children":[],"data":{"hProperties":{"aria-label":"findallfn 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":"findAll(fn)","position":{"start":{"line":127,"column":5,"offset":1863},"end":{"line":127,"column":16,"offset":1874},"indent":[]}}],"position":{"start":{"line":127,"column":1,"offset":1859},"end":{"line":127,"column":16,"offset":1874},"indent":[]},"data":{"id":"findallfn","htmlAttributes":{"id":"findallfn"},"hProperties":{"id":"findallfn"}}},{"type":"paragraph","children":[{"type":"text","value":"返回所有符合条件的元素。","position":{"start":{"line":128,"column":1,"offset":1875},"end":{"line":128,"column":13,"offset":1887},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":128,"column":13,"offset":1887},"end":{"line":128,"column":19,"offset":1893},"indent":[]}},{"type":"text","value":"返回值: ","position":{"start":{"line":128,"column":19,"offset":1893},"end":{"line":128,"column":24,"offset":1898},"indent":[]}},{"type":"linkReference","identifier":" object ","label":" Object ","referenceType":"shortcut","children":[{"type":"text","value":" Object ","position":{"start":{"line":128,"column":25,"offset":1899},"end":{"line":128,"column":33,"offset":1907},"indent":[]}}],"position":{"start":{"line":128,"column":24,"offset":1898},"end":{"line":128,"column":34,"offset":1908},"indent":[]}}],"position":{"start":{"line":128,"column":1,"offset":1875},"end":{"line":128,"column":34,"offset":1908},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":131,"column":3,"offset":1913},"end":{"line":131,"column":5,"offset":1915},"indent":[]}}],"position":{"start":{"line":131,"column":1,"offset":1911},"end":{"line":131,"column":7,"offset":1917},"indent":[]}}],"position":{"start":{"line":131,"column":1,"offset":1911},"end":{"line":131,"column":7,"offset":1917},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":134,"column":3,"offset":1922},"end":{"line":134,"column":5,"offset":1924},"indent":[]}}],"position":{"start":{"line":134,"column":3,"offset":1922},"end":{"line":134,"column":5,"offset":1924},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":134,"column":8,"offset":1927},"end":{"line":134,"column":10,"offset":1929},"indent":[]}}],"position":{"start":{"line":134,"column":8,"offset":1927},"end":{"line":134,"column":10,"offset":1929},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":134,"column":13,"offset":1932},"end":{"line":134,"column":15,"offset":1934},"indent":[]}}],"position":{"start":{"line":134,"column":13,"offset":1932},"end":{"line":134,"column":15,"offset":1934},"indent":[]}}],"position":{"start":{"line":134,"column":1,"offset":1920},"end":{"line":134,"column":17,"offset":1936},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fn","position":{"start":{"line":136,"column":3,"offset":1959},"end":{"line":136,"column":5,"offset":1961},"indent":[]}}],"position":{"start":{"line":136,"column":3,"offset":1959},"end":{"line":136,"column":5,"offset":1961},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Function","position":{"start":{"line":136,"column":8,"offset":1964},"end":{"line":136,"column":16,"offset":1972},"indent":[]}}],"position":{"start":{"line":136,"column":8,"offset":1964},"end":{"line":136,"column":16,"offset":1972},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"自定义回调函数","position":{"start":{"line":136,"column":19,"offset":1975},"end":{"line":136,"column":26,"offset":1982},"indent":[]}}],"position":{"start":{"line":136,"column":19,"offset":1975},"end":{"line":136,"column":26,"offset":1982},"indent":[]}}],"position":{"start":{"line":136,"column":1,"offset":1957},"end":{"line":136,"column":28,"offset":1984},"indent":[]}}],"position":{"start":{"line":134,"column":1,"offset":1920},"end":{"line":136,"column":28,"offset":1984},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":140,"column":3,"offset":1990},"end":{"line":140,"column":5,"offset":1992},"indent":[]}}],"position":{"start":{"line":140,"column":1,"offset":1988},"end":{"line":140,"column":7,"offset":1994},"indent":[]}}],"position":{"start":{"line":140,"column":1,"offset":1988},"end":{"line":140,"column":7,"offset":1994},"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> children <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">findAll</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">function</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">item</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token keyword\">return</span> item<span class=\"token punctuation\">.</span><span class=\"token function\">get</span><span class=\"token punctuation\">(</span><span class=\"token string\">'id'</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">&lt;</span> <span class=\"token number\">10</span><span class=\"token punctuation\">;</span> <span class=\"token comment\">// 获取所有id小于10的元素</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":142,"column":1,"offset":1996},"end":{"line":146,"column":4,"offset":2120},"indent":[1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getshapexy","title":null,"children":[],"data":{"hProperties":{"aria-label":"getshapexy 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":"getShape(x,y)","position":{"start":{"line":149,"column":5,"offset":2127},"end":{"line":149,"column":18,"offset":2140},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":2123},"end":{"line":149,"column":18,"offset":2140},"indent":[]},"data":{"id":"getshapexy","htmlAttributes":{"id":"getshapexy"},"hProperties":{"id":"getshapexy"}}},{"type":"paragraph","children":[{"type":"text","value":"返回该坐标点最上层的元素。","position":{"start":{"line":150,"column":1,"offset":2141},"end":{"line":150,"column":14,"offset":2154},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":150,"column":14,"offset":2154},"end":{"line":150,"column":20,"offset":2160},"indent":[]}},{"type":"text","value":"返回值: Object","position":{"start":{"line":150,"column":20,"offset":2160},"end":{"line":150,"column":31,"offset":2171},"indent":[]}}],"position":{"start":{"line":150,"column":1,"offset":2141},"end":{"line":150,"column":31,"offset":2171},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":153,"column":3,"offset":2176},"end":{"line":153,"column":5,"offset":2178},"indent":[]}}],"position":{"start":{"line":153,"column":1,"offset":2174},"end":{"line":153,"column":7,"offset":2180},"indent":[]}}],"position":{"start":{"line":153,"column":1,"offset":2174},"end":{"line":153,"column":7,"offset":2180},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":156,"column":3,"offset":2185},"end":{"line":156,"column":5,"offset":2187},"indent":[]}}],"position":{"start":{"line":156,"column":3,"offset":2185},"end":{"line":156,"column":5,"offset":2187},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":156,"column":8,"offset":2190},"end":{"line":156,"column":10,"offset":2192},"indent":[]}}],"position":{"start":{"line":156,"column":8,"offset":2190},"end":{"line":156,"column":10,"offset":2192},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":156,"column":13,"offset":2195},"end":{"line":156,"column":15,"offset":2197},"indent":[]}}],"position":{"start":{"line":156,"column":13,"offset":2195},"end":{"line":156,"column":15,"offset":2197},"indent":[]}}],"position":{"start":{"line":156,"column":1,"offset":2183},"end":{"line":156,"column":17,"offset":2199},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"x","position":{"start":{"line":158,"column":3,"offset":2222},"end":{"line":158,"column":4,"offset":2223},"indent":[]}}],"position":{"start":{"line":158,"column":3,"offset":2222},"end":{"line":158,"column":4,"offset":2223},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"number","position":{"start":{"line":158,"column":7,"offset":2226},"end":{"line":158,"column":13,"offset":2232},"indent":[]}}],"position":{"start":{"line":158,"column":7,"offset":2226},"end":{"line":158,"column":13,"offset":2232},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"x 坐标","position":{"start":{"line":158,"column":16,"offset":2235},"end":{"line":158,"column":20,"offset":2239},"indent":[]}}],"position":{"start":{"line":158,"column":16,"offset":2235},"end":{"line":158,"column":20,"offset":2239},"indent":[]}}],"position":{"start":{"line":158,"column":1,"offset":2220},"end":{"line":158,"column":22,"offset":2241},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"y","position":{"start":{"line":159,"column":3,"offset":2244},"end":{"line":159,"column":4,"offset":2245},"indent":[]}}],"position":{"start":{"line":159,"column":3,"offset":2244},"end":{"line":159,"column":4,"offset":2245},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"number","position":{"start":{"line":159,"column":7,"offset":2248},"end":{"line":159,"column":13,"offset":2254},"indent":[]}}],"position":{"start":{"line":159,"column":7,"offset":2248},"end":{"line":159,"column":13,"offset":2254},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"y 坐标","position":{"start":{"line":159,"column":16,"offset":2257},"end":{"line":159,"column":20,"offset":2261},"indent":[]}}],"position":{"start":{"line":159,"column":16,"offset":2257},"end":{"line":159,"column":20,"offset":2261},"indent":[]}}],"position":{"start":{"line":159,"column":1,"offset":2242},"end":{"line":159,"column":22,"offset":2263},"indent":[]}}],"position":{"start":{"line":156,"column":1,"offset":2183},"end":{"line":159,"column":22,"offset":2263},"indent":[1,1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":163,"column":3,"offset":2269},"end":{"line":163,"column":5,"offset":2271},"indent":[]}}],"position":{"start":{"line":163,"column":1,"offset":2267},"end":{"line":163,"column":7,"offset":2273},"indent":[]}}],"position":{"start":{"line":163,"column":1,"offset":2267},"end":{"line":163,"column":7,"offset":2273},"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\">// 获取 (10, 30) 坐标点上层的元素</span>\n<span class=\"token keyword\">const</span> element <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">getShape</span><span class=\"token punctuation\">(</span><span class=\"token number\">10</span><span class=\"token punctuation\">,</span> <span class=\"token number\">30</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":165,"column":1,"offset":2275},"end":{"line":168,"column":4,"offset":2355},"indent":[1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getfirst","title":null,"children":[],"data":{"hProperties":{"aria-label":"getfirst 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":"getFirst()","position":{"start":{"line":171,"column":5,"offset":2362},"end":{"line":171,"column":15,"offset":2372},"indent":[]}}],"position":{"start":{"line":171,"column":1,"offset":2358},"end":{"line":171,"column":15,"offset":2372},"indent":[]},"data":{"id":"getfirst","htmlAttributes":{"id":"getfirst"},"hProperties":{"id":"getfirst"}}},{"type":"paragraph","children":[{"type":"text","value":"获取该分组的第一个子元素。","position":{"start":{"line":172,"column":1,"offset":2373},"end":{"line":172,"column":14,"offset":2386},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":172,"column":14,"offset":2386},"end":{"line":172,"column":20,"offset":2392},"indent":[]}},{"type":"text","value":"返回值: Object","position":{"start":{"line":172,"column":20,"offset":2392},"end":{"line":172,"column":31,"offset":2403},"indent":[]}}],"position":{"start":{"line":172,"column":1,"offset":2373},"end":{"line":172,"column":31,"offset":2403},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":175,"column":3,"offset":2408},"end":{"line":175,"column":5,"offset":2410},"indent":[]}}],"position":{"start":{"line":175,"column":1,"offset":2406},"end":{"line":175,"column":7,"offset":2412},"indent":[]}}],"position":{"start":{"line":175,"column":1,"offset":2406},"end":{"line":175,"column":7,"offset":2412},"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> child <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">getFirst</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// 等价于</span>\n<span class=\"token keyword\">const</span> childrens <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">get</span><span class=\"token punctuation\">(</span><span class=\"token string\">'children'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> child <span class=\"token operator\">=</span> childrens<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":177,"column":1,"offset":2414},"end":{"line":183,"column":4,"offset":2537},"indent":[1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlast","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlast 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":"getLast()","position":{"start":{"line":186,"column":5,"offset":2544},"end":{"line":186,"column":14,"offset":2553},"indent":[]}}],"position":{"start":{"line":186,"column":1,"offset":2540},"end":{"line":186,"column":14,"offset":2553},"indent":[]},"data":{"id":"getlast","htmlAttributes":{"id":"getlast"},"hProperties":{"id":"getlast"}}},{"type":"paragraph","children":[{"type":"text","value":"获取该分组的最后一个子元素。","position":{"start":{"line":187,"column":1,"offset":2554},"end":{"line":187,"column":15,"offset":2568},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":187,"column":15,"offset":2568},"end":{"line":187,"column":21,"offset":2574},"indent":[]}},{"type":"text","value":"返回值: Object","position":{"start":{"line":187,"column":21,"offset":2574},"end":{"line":187,"column":32,"offset":2585},"indent":[]}}],"position":{"start":{"line":187,"column":1,"offset":2554},"end":{"line":187,"column":32,"offset":2585},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":190,"column":3,"offset":2590},"end":{"line":190,"column":5,"offset":2592},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2588},"end":{"line":190,"column":7,"offset":2594},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2588},"end":{"line":190,"column":7,"offset":2594},"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> child <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">getLast</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// 等价于</span>\n<span class=\"token keyword\">const</span> childrens <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">get</span><span class=\"token punctuation\">(</span><span class=\"token string\">'children'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> child <span class=\"token operator\">=</span> childrens<span class=\"token punctuation\">[</span>childrens<span class=\"token punctuation\">.</span>length <span class=\"token operator\">-</span> <span class=\"token number\">1</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":192,"column":1,"offset":2596},"end":{"line":198,"column":4,"offset":2737},"indent":[1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getchildbyindexindex)","title":null,"children":[],"data":{"hProperties":{"aria-label":"getchildbyindexindex) 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":"getChildByIndex(index)","position":{"start":{"line":201,"column":5,"offset":2744},"end":{"line":201,"column":27,"offset":2766},"indent":[]}}],"position":{"start":{"line":201,"column":1,"offset":2740},"end":{"line":201,"column":27,"offset":2766},"indent":[]},"data":{"id":"getchildbyindexindex)","htmlAttributes":{"id":"getchildbyindexindex)"},"hProperties":{"id":"getchildbyindexindex)"}}},{"type":"paragraph","children":[{"type":"text","value":"返回第 ","position":{"start":{"line":202,"column":1,"offset":2767},"end":{"line":202,"column":5,"offset":2771},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">index</code>","position":{"start":{"line":202,"column":5,"offset":2771},"end":{"line":202,"column":12,"offset":2778},"indent":[]}},{"type":"text","value":" 个子元素,从","position":{"start":{"line":202,"column":12,"offset":2778},"end":{"line":202,"column":19,"offset":2785},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">0</code>","position":{"start":{"line":202,"column":19,"offset":2785},"end":{"line":202,"column":22,"offset":2788},"indent":[]}},{"type":"text","value":"开始计数。","position":{"start":{"line":202,"column":22,"offset":2788},"end":{"line":202,"column":27,"offset":2793},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":202,"column":27,"offset":2793},"end":{"line":202,"column":33,"offset":2799},"indent":[]}},{"type":"text","value":"返回值: Object","position":{"start":{"line":202,"column":33,"offset":2799},"end":{"line":202,"column":44,"offset":2810},"indent":[]}}],"position":{"start":{"line":202,"column":1,"offset":2767},"end":{"line":202,"column":44,"offset":2810},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数","position":{"start":{"line":205,"column":3,"offset":2815},"end":{"line":205,"column":5,"offset":2817},"indent":[]}}],"position":{"start":{"line":205,"column":1,"offset":2813},"end":{"line":205,"column":7,"offset":2819},"indent":[]}}],"position":{"start":{"line":205,"column":1,"offset":2813},"end":{"line":205,"column":7,"offset":2819},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":208,"column":3,"offset":2824},"end":{"line":208,"column":5,"offset":2826},"indent":[]}}],"position":{"start":{"line":208,"column":3,"offset":2824},"end":{"line":208,"column":5,"offset":2826},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":208,"column":8,"offset":2829},"end":{"line":208,"column":10,"offset":2831},"indent":[]}}],"position":{"start":{"line":208,"column":8,"offset":2829},"end":{"line":208,"column":10,"offset":2831},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":208,"column":13,"offset":2834},"end":{"line":208,"column":15,"offset":2836},"indent":[]}}],"position":{"start":{"line":208,"column":13,"offset":2834},"end":{"line":208,"column":15,"offset":2836},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2822},"end":{"line":208,"column":17,"offset":2838},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"index","position":{"start":{"line":210,"column":3,"offset":2861},"end":{"line":210,"column":8,"offset":2866},"indent":[]}}],"position":{"start":{"line":210,"column":3,"offset":2861},"end":{"line":210,"column":8,"offset":2866},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"number","position":{"start":{"line":210,"column":11,"offset":2869},"end":{"line":210,"column":17,"offset":2875},"indent":[]}}],"position":{"start":{"line":210,"column":11,"offset":2869},"end":{"line":210,"column":17,"offset":2875},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"子元素的序号,默认为 0","position":{"start":{"line":210,"column":20,"offset":2878},"end":{"line":210,"column":32,"offset":2890},"indent":[]}}],"position":{"start":{"line":210,"column":20,"offset":2878},"end":{"line":210,"column":32,"offset":2890},"indent":[]}}],"position":{"start":{"line":210,"column":1,"offset":2859},"end":{"line":210,"column":34,"offset":2892},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2822},"end":{"line":210,"column":34,"offset":2892},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":214,"column":3,"offset":2898},"end":{"line":214,"column":5,"offset":2900},"indent":[]}}],"position":{"start":{"line":214,"column":1,"offset":2896},"end":{"line":214,"column":7,"offset":2902},"indent":[]}}],"position":{"start":{"line":214,"column":1,"offset":2896},"end":{"line":214,"column":7,"offset":2902},"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> child <span class=\"token operator\">=</span> group<span class=\"token punctuation\">.</span><span class=\"token function\">getChildByIndex</span><span class=\"token punctuation\">(</span><span class=\"token number\">2</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":216,"column":1,"offset":2904},"end":{"line":218,"column":4,"offset":2960},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#removechildchild","title":null,"children":[],"data":{"hProperties":{"aria-label":"removechildchild 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":"removeChild(child)","position":{"start":{"line":221,"column":5,"offset":2967},"end":{"line":221,"column":23,"offset":2985},"indent":[]}}],"position":{"start":{"line":221,"column":1,"offset":2963},"end":{"line":221,"column":23,"offset":2985},"indent":[]},"data":{"id":"removechildchild","htmlAttributes":{"id":"removechildchild"},"hProperties":{"id":"removechildchild"}}},{"type":"paragraph","children":[{"type":"text","value":"从分组中删除一个分组或一个图形。","position":{"start":{"line":222,"column":1,"offset":2986},"end":{"line":222,"column":17,"offset":3002},"indent":[]}}],"position":{"start":{"line":222,"column":1,"offset":2986},"end":{"line":222,"column":17,"offset":3002},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"参数说明","position":{"start":{"line":225,"column":3,"offset":3007},"end":{"line":225,"column":7,"offset":3011},"indent":[]}}],"position":{"start":{"line":225,"column":1,"offset":3005},"end":{"line":225,"column":9,"offset":3013},"indent":[]}}],"position":{"start":{"line":225,"column":1,"offset":3005},"end":{"line":225,"column":9,"offset":3013},"indent":[]}},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":227,"column":3,"offset":3017},"end":{"line":227,"column":5,"offset":3019},"indent":[]}}],"position":{"start":{"line":227,"column":3,"offset":3017},"end":{"line":227,"column":5,"offset":3019},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":227,"column":8,"offset":3022},"end":{"line":227,"column":10,"offset":3024},"indent":[]}}],"position":{"start":{"line":227,"column":8,"offset":3022},"end":{"line":227,"column":10,"offset":3024},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"说明","position":{"start":{"line":227,"column":13,"offset":3027},"end":{"line":227,"column":15,"offset":3029},"indent":[]}}],"position":{"start":{"line":227,"column":13,"offset":3027},"end":{"line":227,"column":15,"offset":3029},"indent":[]}}],"position":{"start":{"line":227,"column":1,"offset":3015},"end":{"line":227,"column":17,"offset":3031},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"child","position":{"start":{"line":229,"column":3,"offset":3054},"end":{"line":229,"column":8,"offset":3059},"indent":[]}}],"position":{"start":{"line":229,"column":3,"offset":3054},"end":{"line":229,"column":8,"offset":3059},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Group","position":{"start":{"line":229,"column":11,"offset":3062},"end":{"line":229,"column":16,"offset":3067},"indent":[]}}],"position":{"start":{"line":229,"column":11,"offset":3062},"end":{"line":229,"column":16,"offset":3067},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Shape","position":{"start":{"line":229,"column":19,"offset":3070},"end":{"line":229,"column":24,"offset":3075},"indent":[]}}],"position":{"start":{"line":229,"column":19,"offset":3070},"end":{"line":229,"column":24,"offset":3075},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"子 Group 或 Shape 实例","position":{"start":{"line":229,"column":27,"offset":3078},"end":{"line":229,"column":45,"offset":3096},"indent":[]}}],"position":{"start":{"line":229,"column":27,"offset":3078},"end":{"line":229,"column":45,"offset":3096},"indent":[]}}],"position":{"start":{"line":229,"column":1,"offset":3052},"end":{"line":229,"column":47,"offset":3098},"indent":[]}}],"position":{"start":{"line":227,"column":1,"offset":3015},"end":{"line":229,"column":47,"offset":3098},"indent":[1,1]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":233,"column":3,"offset":3104},"end":{"line":233,"column":5,"offset":3106},"indent":[]}}],"position":{"start":{"line":233,"column":1,"offset":3102},"end":{"line":233,"column":7,"offset":3108},"indent":[]}}],"position":{"start":{"line":233,"column":1,"offset":3102},"end":{"line":233,"column":7,"offset":3108},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">group<span class=\"token punctuation\">.</span><span class=\"token function\">removeChild</span><span class=\"token punctuation\">(</span>child<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":235,"column":1,"offset":3110},"end":{"line":237,"column":4,"offset":3152},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#sort","title":null,"children":[],"data":{"hProperties":{"aria-label":"sort 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":"sort()","position":{"start":{"line":240,"column":5,"offset":3159},"end":{"line":240,"column":11,"offset":3165},"indent":[]}}],"position":{"start":{"line":240,"column":1,"offset":3155},"end":{"line":240,"column":11,"offset":3165},"indent":[]},"data":{"id":"sort","htmlAttributes":{"id":"sort"},"hProperties":{"id":"sort"}}},{"type":"paragraph","children":[{"type":"text","value":"排序方法。","position":{"start":{"line":241,"column":1,"offset":3166},"end":{"line":241,"column":6,"offset":3171},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":241,"column":6,"offset":3171},"end":{"line":241,"column":12,"offset":3177},"indent":[]}},{"type":"text","value":"一般用于在设置子元素层叠顺序时使用。","position":{"start":{"line":241,"column":12,"offset":3177},"end":{"line":241,"column":30,"offset":3195},"indent":[]}}],"position":{"start":{"line":241,"column":1,"offset":3166},"end":{"line":241,"column":30,"offset":3195},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"典型使用场景:通过 group.addShape() 添加 shape 时,添加的每个 shape 都设置了 index,在最后调用 group.sort() 可以对添加的 shape 进行排序。","position":{"start":{"line":243,"column":1,"offset":3197},"end":{"line":243,"column":99,"offset":3295},"indent":[]}}],"position":{"start":{"line":243,"column":1,"offset":3197},"end":{"line":243,"column":99,"offset":3295},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":246,"column":3,"offset":3300},"end":{"line":246,"column":5,"offset":3302},"indent":[]}}],"position":{"start":{"line":246,"column":1,"offset":3298},"end":{"line":246,"column":7,"offset":3304},"indent":[]}}],"position":{"start":{"line":246,"column":1,"offset":3298},"end":{"line":246,"column":7,"offset":3304},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">group<span class=\"token punctuation\">.</span><span class=\"token function\">sort</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":248,"column":1,"offset":3306},"end":{"line":250,"column":4,"offset":3336},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#clear","title":null,"children":[],"data":{"hProperties":{"aria-label":"clear 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":"clear()","position":{"start":{"line":253,"column":5,"offset":3343},"end":{"line":253,"column":12,"offset":3350},"indent":[]}}],"position":{"start":{"line":253,"column":1,"offset":3339},"end":{"line":253,"column":12,"offset":3350},"indent":[]},"data":{"id":"clear","htmlAttributes":{"id":"clear"},"hProperties":{"id":"clear"}}},{"type":"paragraph","children":[{"type":"text","value":"清除该组的所有子元素。","position":{"start":{"line":254,"column":1,"offset":3351},"end":{"line":254,"column":12,"offset":3362},"indent":[]}}],"position":{"start":{"line":254,"column":1,"offset":3351},"end":{"line":254,"column":12,"offset":3362},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"用法","position":{"start":{"line":257,"column":3,"offset":3367},"end":{"line":257,"column":5,"offset":3369},"indent":[]}}],"position":{"start":{"line":257,"column":1,"offset":3365},"end":{"line":257,"column":7,"offset":3371},"indent":[]}}],"position":{"start":{"line":257,"column":1,"offset":3365},"end":{"line":257,"column":7,"offset":3371},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">group<span class=\"token punctuation\">.</span><span class=\"token function\">clear</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":259,"column":1,"offset":3373},"end":{"line":261,"column":4,"offset":3404},"indent":[1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":262,"column":1,"offset":3405}}}}