@antv/g6
Version:
graph visualization frame work
1 lines • 64.2 kB
JSON
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-7b357bb16be307026e7f06844681be76-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":2,"children":[{"type":"link","url":"#image","title":null,"children":[],"data":{"hProperties":{"aria-label":"image 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":"Image","position":{"start":{"line":1,"column":4,"offset":3},"end":{"line":1,"column":9,"offset":8},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":9,"offset":8},"indent":[]},"data":{"id":"image","htmlAttributes":{"id":"image"},"hProperties":{"id":"image"}}},{"type":"paragraph","children":[{"type":"text","value":"G6 内置了 image 节点,其默认样式如下。标签文本位于图片下方。","position":{"start":{"line":3,"column":1,"offset":10},"end":{"line":3,"column":36,"offset":45},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":3,"column":36,"offset":45},"end":{"line":3,"column":42,"offset":51},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570871887871-f6d9d589-f89c-4223-b19e-7e3704fd2a7b.png#align=left&display=inline&height=182&name=image.png&originHeight=364&originWidth=338&search=&size=73813&status=done&width=169","alt":"image.png","position":{"start":{"line":3,"column":42,"offset":51},"end":{"line":3,"column":282,"offset":291},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":10},"end":{"line":3,"column":282,"offset":291},"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":6,"column":4,"offset":297},"end":{"line":6,"column":8,"offset":301},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":294},"end":{"line":6,"column":8,"offset":301},"indent":[]},"data":{"id":"使用方法","htmlAttributes":{"id":"使用方法"},"hProperties":{"id":"使用方法"}}},{"type":"paragraph","children":[{"type":"text","value":"如 ","position":{"start":{"line":7,"column":1,"offset":302},"end":{"line":7,"column":3,"offset":304},"indent":[]}},{"type":"link","title":null,"url":"../defaultNode","children":[{"type":"text","value":"内置节点","position":{"start":{"line":7,"column":4,"offset":305},"end":{"line":7,"column":8,"offset":309},"indent":[]}}],"position":{"start":{"line":7,"column":3,"offset":304},"end":{"line":7,"column":25,"offset":326},"indent":[]}},{"type":"text","value":" 一节所示,配置节点的方式有两种:实例化图时全局配置,在数据中动态配置。","position":{"start":{"line":7,"column":25,"offset":326},"end":{"line":7,"column":61,"offset":362},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":302},"end":{"line":7,"column":61,"offset":362},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#1-实例化图时全局配置","title":null,"children":[],"data":{"hProperties":{"aria-label":"1 实例化图时全局配置 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":"1 实例化图时全局配置","position":{"start":{"line":10,"column":5,"offset":369},"end":{"line":10,"column":16,"offset":380},"indent":[]}}],"position":{"start":{"line":10,"column":1,"offset":365},"end":{"line":10,"column":16,"offset":380},"indent":[]},"data":{"id":"1-实例化图时全局配置","htmlAttributes":{"id":"1-实例化图时全局配置"},"hProperties":{"id":"1-实例化图时全局配置"}}},{"type":"paragraph","children":[{"type":"text","value":"用户在实例化 Graph 时候可以通过 ","position":{"start":{"line":11,"column":1,"offset":381},"end":{"line":11,"column":21,"offset":401},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":11,"column":21,"offset":401},"end":{"line":11,"column":34,"offset":414},"indent":[]}},{"type":"text","value":" 指定 ","position":{"start":{"line":11,"column":34,"offset":414},"end":{"line":11,"column":38,"offset":418},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">shape</code>","position":{"start":{"line":11,"column":38,"offset":418},"end":{"line":11,"column":45,"offset":425},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":11,"column":45,"offset":425},"end":{"line":11,"column":48,"offset":428},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'image'</code>","position":{"start":{"line":11,"column":48,"offset":428},"end":{"line":11,"column":57,"offset":437},"indent":[]}},{"type":"text","value":",即可使用 ","position":{"start":{"line":11,"column":57,"offset":437},"end":{"line":11,"column":63,"offset":443},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">image</code>","position":{"start":{"line":11,"column":63,"offset":443},"end":{"line":11,"column":70,"offset":450},"indent":[]}},{"type":"text","value":" 节点。","position":{"start":{"line":11,"column":70,"offset":450},"end":{"line":11,"column":74,"offset":454},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":381},"end":{"line":11,"column":74,"offset":454},"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> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n container<span class=\"token punctuation\">:</span> <span class=\"token string\">'mountNode'</span><span class=\"token punctuation\">,</span>\n width<span class=\"token punctuation\">:</span> <span class=\"token number\">800</span><span class=\"token punctuation\">,</span>\n height<span class=\"token punctuation\">:</span> <span class=\"token number\">600</span><span class=\"token punctuation\">,</span>\n defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'image'</span><span class=\"token punctuation\">,</span>\n label<span class=\"token punctuation\">:</span> <span class=\"token string\">'AntV Team'</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// 其他配置</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":12,"column":1,"offset":455},"end":{"line":23,"column":4,"offset":635},"indent":[1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#2-在数据中动态配置","title":null,"children":[],"data":{"hProperties":{"aria-label":"2 在数据中动态配置 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":"2 在数据中动态配置","position":{"start":{"line":26,"column":5,"offset":642},"end":{"line":26,"column":15,"offset":652},"indent":[]}}],"position":{"start":{"line":26,"column":1,"offset":638},"end":{"line":26,"column":15,"offset":652},"indent":[]},"data":{"id":"2-在数据中动态配置","htmlAttributes":{"id":"2-在数据中动态配置"},"hProperties":{"id":"2-在数据中动态配置"}}},{"type":"paragraph","children":[{"type":"text","value":"如果需要使不同节点有不同的配置,可以将配置写入到节点数据中。这种配置方式可以通过下面代码的形式直接写入数据,也可以通过遍历数据的方式写入。","position":{"start":{"line":27,"column":1,"offset":653},"end":{"line":27,"column":70,"offset":722},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":653},"end":{"line":27,"column":70,"offset":722},"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> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n nodes<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">{</span>\n id<span class=\"token punctuation\">:</span> <span class=\"token string\">'node0'</span><span class=\"token punctuation\">,</span>\n \timg<span class=\"token punctuation\">:</span> <span class=\"token string\">'https://yyb.gtimg.com/aiplat/page/product/visionimgidy/img/demo6-16a47e5d31.jpg?max_age=31536000'</span><span class=\"token punctuation\">,</span>\n shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'image'</span><span class=\"token punctuation\">,</span>\n size<span class=\"token punctuation\">:</span> <span class=\"token number\">200</span><span class=\"token punctuation\">,</span>\n label<span class=\"token punctuation\">:</span> <span class=\"token string\">'AntV Team'</span><span class=\"token punctuation\">,</span>\n labelCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n position<span class=\"token punctuation\">:</span> <span class=\"token string\">'bottom'</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// 裁剪图片配置</span>\n clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span>\n r<span class=\"token punctuation\">:</span> <span class=\"token number\">15</span>\n <span class=\"token punctuation\">}</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token operator\">...</span> <span class=\"token comment\">// 其他节点</span>\n <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n edges<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token operator\">...</span> <span class=\"token comment\">// 边</span>\n <span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":28,"column":1,"offset":723},"end":{"line":52,"column":4,"offset":1143},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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":55,"column":4,"offset":1149},"end":{"line":55,"column":9,"offset":1154},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":1146},"end":{"line":55,"column":9,"offset":1154},"indent":[]},"data":{"id":"配置项说明","htmlAttributes":{"id":"配置项说明"},"hProperties":{"id":"配置项说明"}}},{"type":"paragraph","children":[{"type":"text","value":"image 节点支持以下的配置项:","position":{"start":{"line":57,"column":1,"offset":1156},"end":{"line":57,"column":18,"offset":1173},"indent":[]}}],"position":{"start":{"line":57,"column":1,"offset":1156},"end":{"line":57,"column":18,"offset":1173},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">img<span class=\"token punctuation\">:</span> <span class=\"token string\">'https://yyb.gtimg.com/aiplat/page/product/visionimgidy/img/demo6-16a47e5d31.jpg?max_age=31536000'</span><span class=\"token punctuation\">,</span>\nsize<span class=\"token punctuation\">:</span> <span class=\"token number\">200</span><span class=\"token punctuation\">,</span>\n labelCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n position<span class=\"token punctuation\">:</span> <span class=\"token string\">'bottom'</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// 裁剪图片配置</span>\n clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// circle</span>\n r<span class=\"token punctuation\">:</span> <span class=\"token number\">15</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// ellipse</span>\n rx<span class=\"token punctuation\">:</span> <span class=\"token number\">10</span><span class=\"token punctuation\">,</span>\n ry<span class=\"token punctuation\">:</span> <span class=\"token number\">15</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// rect</span>\n width<span class=\"token punctuation\">:</span> <span class=\"token number\">15</span><span class=\"token punctuation\">,</span>\n height<span class=\"token punctuation\">:</span> <span class=\"token number\">15</span><span class=\"token punctuation\">,</span>\n <span class=\"token comment\">// 坐标</span>\n x<span class=\"token punctuation\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\n y<span class=\"token punctuation\">:</span> <span class=\"token number\">0</span>\n <span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":58,"column":1,"offset":1174},"end":{"line":80,"column":4,"offset":1551},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":82,"column":3,"offset":1555},"end":{"line":82,"column":5,"offset":1557},"indent":[]}}],"position":{"start":{"line":82,"column":3,"offset":1555},"end":{"line":82,"column":5,"offset":1557},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":82,"column":8,"offset":1560},"end":{"line":82,"column":10,"offset":1562},"indent":[]}}],"position":{"start":{"line":82,"column":8,"offset":1560},"end":{"line":82,"column":10,"offset":1562},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":82,"column":13,"offset":1565},"end":{"line":82,"column":15,"offset":1567},"indent":[]}}],"position":{"start":{"line":82,"column":13,"offset":1565},"end":{"line":82,"column":15,"offset":1567},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":82,"column":18,"offset":1570},"end":{"line":82,"column":20,"offset":1572},"indent":[]}}],"position":{"start":{"line":82,"column":18,"offset":1570},"end":{"line":82,"column":20,"offset":1572},"indent":[]}}],"position":{"start":{"line":82,"column":1,"offset":1553},"end":{"line":82,"column":22,"offset":1574},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"img","position":{"start":{"line":84,"column":5,"offset":1605},"end":{"line":84,"column":8,"offset":1608},"indent":[]}}],"position":{"start":{"line":84,"column":3,"offset":1603},"end":{"line":84,"column":10,"offset":1610},"indent":[]}}],"position":{"start":{"line":84,"column":3,"offset":1603},"end":{"line":84,"column":10,"offset":1610},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"图片 URL 地址","position":{"start":{"line":84,"column":15,"offset":1615},"end":{"line":84,"column":24,"offset":1624},"indent":[]}}],"position":{"start":{"line":84,"column":13,"offset":1613},"end":{"line":84,"column":26,"offset":1626},"indent":[]}}],"position":{"start":{"line":84,"column":13,"offset":1613},"end":{"line":84,"column":26,"offset":1626},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"String","position":{"start":{"line":84,"column":31,"offset":1631},"end":{"line":84,"column":37,"offset":1637},"indent":[]}}],"position":{"start":{"line":84,"column":29,"offset":1629},"end":{"line":84,"column":39,"offset":1639},"indent":[]}}],"position":{"start":{"line":84,"column":29,"offset":1629},"end":{"line":84,"column":39,"offset":1639},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"image 节点特有","position":{"start":{"line":84,"column":44,"offset":1644},"end":{"line":84,"column":54,"offset":1654},"indent":[]}}],"position":{"start":{"line":84,"column":42,"offset":1642},"end":{"line":84,"column":56,"offset":1656},"indent":[]}}],"position":{"start":{"line":84,"column":42,"offset":1642},"end":{"line":84,"column":56,"offset":1656},"indent":[]}}],"position":{"start":{"line":84,"column":1,"offset":1601},"end":{"line":84,"column":58,"offset":1658},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":85,"column":3,"offset":1661},"end":{"line":85,"column":7,"offset":1665},"indent":[]}}],"position":{"start":{"line":85,"column":3,"offset":1661},"end":{"line":85,"column":7,"offset":1665},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"图片大小","position":{"start":{"line":85,"column":10,"offset":1668},"end":{"line":85,"column":14,"offset":1672},"indent":[]}}],"position":{"start":{"line":85,"column":10,"offset":1668},"end":{"line":85,"column":14,"offset":1672},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":85,"column":17,"offset":1675},"end":{"line":85,"column":23,"offset":1681},"indent":[]}}],"position":{"start":{"line":85,"column":17,"offset":1675},"end":{"line":85,"column":23,"offset":1681},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Array","position":{"start":{"line":85,"column":26,"offset":1684},"end":{"line":85,"column":31,"offset":1689},"indent":[]}}],"position":{"start":{"line":85,"column":26,"offset":1684},"end":{"line":85,"column":31,"offset":1689},"indent":[]}},{"type":"tableCell","children":[{"type":"html","value":"<code class=\"language-text\">size</code>","position":{"start":{"line":85,"column":34,"offset":1692},"end":{"line":85,"column":40,"offset":1698},"indent":[]}},{"type":"text","value":" 为单个值时,表示宽高相等","position":{"start":{"line":85,"column":40,"offset":1698},"end":{"line":85,"column":53,"offset":1711},"indent":[]}}],"position":{"start":{"line":85,"column":34,"offset":1692},"end":{"line":85,"column":53,"offset":1711},"indent":[]}}],"position":{"start":{"line":85,"column":1,"offset":1659},"end":{"line":85,"column":55,"offset":1713},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"labelCfg","position":{"start":{"line":86,"column":3,"offset":1716},"end":{"line":86,"column":11,"offset":1724},"indent":[]}}],"position":{"start":{"line":86,"column":3,"offset":1716},"end":{"line":86,"column":11,"offset":1724},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"文件配置项","position":{"start":{"line":86,"column":14,"offset":1727},"end":{"line":86,"column":19,"offset":1732},"indent":[]}}],"position":{"start":{"line":86,"column":14,"offset":1727},"end":{"line":86,"column":19,"offset":1732},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":86,"column":22,"offset":1735},"end":{"line":86,"column":28,"offset":1741},"indent":[]}}],"position":{"start":{"line":86,"column":22,"offset":1735},"end":{"line":86,"column":28,"offset":1741},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":86,"column":32,"offset":1745},"end":{"line":86,"column":32,"offset":1745},"indent":[]}}],"position":{"start":{"line":86,"column":1,"offset":1714},"end":{"line":86,"column":33,"offset":1746},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"clipCfg","position":{"start":{"line":87,"column":5,"offset":1751},"end":{"line":87,"column":12,"offset":1758},"indent":[]}}],"position":{"start":{"line":87,"column":3,"offset":1749},"end":{"line":87,"column":14,"offset":1760},"indent":[]}}],"position":{"start":{"line":87,"column":3,"offset":1749},"end":{"line":87,"column":14,"offset":1760},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"裁剪图片的配置项","position":{"start":{"line":87,"column":19,"offset":1765},"end":{"line":87,"column":27,"offset":1773},"indent":[]}}],"position":{"start":{"line":87,"column":17,"offset":1763},"end":{"line":87,"column":29,"offset":1775},"indent":[]}}],"position":{"start":{"line":87,"column":17,"offset":1763},"end":{"line":87,"column":29,"offset":1775},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"Object","position":{"start":{"line":87,"column":34,"offset":1780},"end":{"line":87,"column":40,"offset":1786},"indent":[]}}],"position":{"start":{"line":87,"column":32,"offset":1778},"end":{"line":87,"column":42,"offset":1788},"indent":[]}}],"position":{"start":{"line":87,"column":32,"offset":1778},"end":{"line":87,"column":42,"offset":1788},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"默认不裁剪,image 节点特有","position":{"start":{"line":87,"column":47,"offset":1793},"end":{"line":87,"column":63,"offset":1809},"indent":[]}}],"position":{"start":{"line":87,"column":45,"offset":1791},"end":{"line":87,"column":65,"offset":1811},"indent":[]}}],"position":{"start":{"line":87,"column":45,"offset":1791},"end":{"line":87,"column":65,"offset":1811},"indent":[]}}],"position":{"start":{"line":87,"column":1,"offset":1747},"end":{"line":87,"column":67,"offset":1813},"indent":[]}}],"position":{"start":{"line":82,"column":1,"offset":1553},"end":{"line":87,"column":67,"offset":1813},"indent":[1,1,1,1,1]}},{"type":"heading","depth":3,"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":91,"column":5,"offset":1821},"end":{"line":91,"column":7,"offset":1823},"indent":[]}}],"position":{"start":{"line":91,"column":1,"offset":1817},"end":{"line":91,"column":8,"offset":1824},"indent":[]},"data":{"id":"剪裁","htmlAttributes":{"id":"剪裁"},"hProperties":{"id":"剪裁"}}},{"type":"paragraph","children":[{"type":"html","value":"<code class=\"language-text\">clipCfg</code>","position":{"start":{"line":92,"column":1,"offset":1825},"end":{"line":92,"column":10,"offset":1834},"indent":[]}}],"position":{"start":{"line":92,"column":1,"offset":1825},"end":{"line":92,"column":10,"offset":1834},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":94,"column":3,"offset":1838},"end":{"line":94,"column":5,"offset":1840},"indent":[]}}],"position":{"start":{"line":94,"column":3,"offset":1838},"end":{"line":94,"column":5,"offset":1840},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":94,"column":8,"offset":1843},"end":{"line":94,"column":10,"offset":1845},"indent":[]}}],"position":{"start":{"line":94,"column":8,"offset":1843},"end":{"line":94,"column":10,"offset":1845},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":94,"column":13,"offset":1848},"end":{"line":94,"column":15,"offset":1850},"indent":[]}}],"position":{"start":{"line":94,"column":13,"offset":1848},"end":{"line":94,"column":15,"offset":1850},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":94,"column":18,"offset":1853},"end":{"line":94,"column":20,"offset":1855},"indent":[]}}],"position":{"start":{"line":94,"column":18,"offset":1853},"end":{"line":94,"column":20,"offset":1855},"indent":[]}}],"position":{"start":{"line":94,"column":1,"offset":1836},"end":{"line":94,"column":22,"offset":1857},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"type","position":{"start":{"line":96,"column":3,"offset":1886},"end":{"line":96,"column":7,"offset":1890},"indent":[]}}],"position":{"start":{"line":96,"column":3,"offset":1886},"end":{"line":96,"column":7,"offset":1890},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"裁剪的图片形状","position":{"start":{"line":96,"column":10,"offset":1893},"end":{"line":96,"column":17,"offset":1900},"indent":[]}}],"position":{"start":{"line":96,"column":10,"offset":1893},"end":{"line":96,"column":17,"offset":1900},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":96,"column":20,"offset":1903},"end":{"line":96,"column":26,"offset":1909},"indent":[]}}],"position":{"start":{"line":96,"column":20,"offset":1903},"end":{"line":96,"column":26,"offset":1909},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"支持 ","position":{"start":{"line":96,"column":29,"offset":1912},"end":{"line":96,"column":32,"offset":1915},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'circle'</code>","position":{"start":{"line":96,"column":32,"offset":1915},"end":{"line":96,"column":42,"offset":1925},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":96,"column":42,"offset":1925},"end":{"line":96,"column":43,"offset":1926},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":96,"column":43,"offset":1926},"end":{"line":96,"column":51,"offset":1934},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":96,"column":51,"offset":1934},"end":{"line":96,"column":52,"offset":1935},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":96,"column":52,"offset":1935},"end":{"line":96,"column":63,"offset":1946},"indent":[]}}],"position":{"start":{"line":96,"column":29,"offset":1912},"end":{"line":96,"column":63,"offset":1946},"indent":[]}}],"position":{"start":{"line":96,"column":1,"offset":1884},"end":{"line":96,"column":65,"offset":1948},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"x","position":{"start":{"line":97,"column":3,"offset":1951},"end":{"line":97,"column":4,"offset":1952},"indent":[]}}],"position":{"start":{"line":97,"column":3,"offset":1951},"end":{"line":97,"column":4,"offset":1952},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"裁剪图形的 x 坐标","position":{"start":{"line":97,"column":7,"offset":1955},"end":{"line":97,"column":17,"offset":1965},"indent":[]}}],"position":{"start":{"line":97,"column":7,"offset":1955},"end":{"line":97,"column":17,"offset":1965},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":97,"column":20,"offset":1968},"end":{"line":97,"column":26,"offset":1974},"indent":[]}}],"position":{"start":{"line":97,"column":20,"offset":1968},"end":{"line":97,"column":26,"offset":1974},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 0,类型为 ","position":{"start":{"line":97,"column":29,"offset":1977},"end":{"line":97,"column":39,"offset":1987},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'circle'</code>","position":{"start":{"line":97,"column":39,"offset":1987},"end":{"line":97,"column":49,"offset":1997},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":97,"column":49,"offset":1997},"end":{"line":97,"column":50,"offset":1998},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":97,"column":50,"offset":1998},"end":{"line":97,"column":58,"offset":2006},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":97,"column":58,"offset":2006},"end":{"line":97,"column":59,"offset":2007},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":97,"column":59,"offset":2007},"end":{"line":97,"column":70,"offset":2018},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":97,"column":70,"offset":2018},"end":{"line":97,"column":74,"offset":2022},"indent":[]}}],"position":{"start":{"line":97,"column":29,"offset":1977},"end":{"line":97,"column":74,"offset":2022},"indent":[]}}],"position":{"start":{"line":97,"column":1,"offset":1949},"end":{"line":97,"column":76,"offset":2024},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"y","position":{"start":{"line":98,"column":3,"offset":2027},"end":{"line":98,"column":4,"offset":2028},"indent":[]}}],"position":{"start":{"line":98,"column":3,"offset":2027},"end":{"line":98,"column":4,"offset":2028},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"裁剪图形的 y 坐标","position":{"start":{"line":98,"column":7,"offset":2031},"end":{"line":98,"column":17,"offset":2041},"indent":[]}}],"position":{"start":{"line":98,"column":7,"offset":2031},"end":{"line":98,"column":17,"offset":2041},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":98,"column":20,"offset":2044},"end":{"line":98,"column":26,"offset":2050},"indent":[]}}],"position":{"start":{"line":98,"column":20,"offset":2044},"end":{"line":98,"column":26,"offset":2050},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 0,类型为 ","position":{"start":{"line":98,"column":29,"offset":2053},"end":{"line":98,"column":39,"offset":2063},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'circle'</code>","position":{"start":{"line":98,"column":39,"offset":2063},"end":{"line":98,"column":49,"offset":2073},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":98,"column":49,"offset":2073},"end":{"line":98,"column":50,"offset":2074},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":98,"column":50,"offset":2074},"end":{"line":98,"column":58,"offset":2082},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":98,"column":58,"offset":2082},"end":{"line":98,"column":59,"offset":2083},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":98,"column":59,"offset":2083},"end":{"line":98,"column":70,"offset":2094},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":98,"column":70,"offset":2094},"end":{"line":98,"column":74,"offset":2098},"indent":[]}}],"position":{"start":{"line":98,"column":29,"offset":2053},"end":{"line":98,"column":74,"offset":2098},"indent":[]}}],"position":{"start":{"line":98,"column":1,"offset":2025},"end":{"line":98,"column":76,"offset":2100},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"show","position":{"start":{"line":99,"column":3,"offset":2103},"end":{"line":99,"column":7,"offset":2107},"indent":[]}}],"position":{"start":{"line":99,"column":3,"offset":2103},"end":{"line":99,"column":7,"offset":2107},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否启用裁剪功能","position":{"start":{"line":99,"column":10,"offset":2110},"end":{"line":99,"column":18,"offset":2118},"indent":[]}}],"position":{"start":{"line":99,"column":10,"offset":2110},"end":{"line":99,"column":18,"offset":2118},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":99,"column":21,"offset":2121},"end":{"line":99,"column":28,"offset":2128},"indent":[]}}],"position":{"start":{"line":99,"column":21,"offset":2121},"end":{"line":99,"column":28,"offset":2128},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不裁剪,值为 ","position":{"start":{"line":99,"column":31,"offset":2131},"end":{"line":99,"column":40,"offset":2140},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">false</code>","position":{"start":{"line":99,"column":40,"offset":2140},"end":{"line":99,"column":47,"offset":2147},"indent":[]}}],"position":{"start":{"line":99,"column":31,"offset":2131},"end":{"line":99,"column":47,"offset":2147},"indent":[]}}],"position":{"start":{"line":99,"column":1,"offset":2101},"end":{"line":99,"column":49,"offset":2149},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"r","position":{"start":{"line":100,"column":3,"offset":2152},"end":{"line":100,"column":4,"offset":2153},"indent":[]}}],"position":{"start":{"line":100,"column":3,"offset":2152},"end":{"line":100,"column":4,"offset":2153},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁圆形的半径","position":{"start":{"line":100,"column":7,"offset":2156},"end":{"line":100,"column":14,"offset":2163},"indent":[]}}],"position":{"start":{"line":100,"column":7,"offset":2156},"end":{"line":100,"column":14,"offset":2163},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":100,"column":17,"offset":2166},"end":{"line":100,"column":23,"offset":2172},"indent":[]}}],"position":{"start":{"line":100,"column":17,"offset":2166},"end":{"line":100,"column":23,"offset":2172},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁 type 为 ","position":{"start":{"line":100,"column":26,"offset":2175},"end":{"line":100,"column":36,"offset":2185},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'circle'</code>","position":{"start":{"line":100,"column":36,"offset":2185},"end":{"line":100,"column":46,"offset":2195},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":100,"column":46,"offset":2195},"end":{"line":100,"column":50,"offset":2199},"indent":[]}}],"position":{"start":{"line":100,"column":26,"offset":2175},"end":{"line":100,"column":50,"offset":2199},"indent":[]}}],"position":{"start":{"line":100,"column":1,"offset":2150},"end":{"line":100,"column":52,"offset":2201},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"width","position":{"start":{"line":101,"column":3,"offset":2204},"end":{"line":101,"column":8,"offset":2209},"indent":[]}}],"position":{"start":{"line":101,"column":3,"offset":2204},"end":{"line":101,"column":8,"offset":2209},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁矩形的宽度","position":{"start":{"line":101,"column":11,"offset":2212},"end":{"line":101,"column":18,"offset":2219},"indent":[]}}],"position":{"start":{"line":101,"column":11,"offset":2212},"end":{"line":101,"column":18,"offset":2219},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":101,"column":21,"offset":2222},"end":{"line":101,"column":27,"offset":2228},"indent":[]}}],"position":{"start":{"line":101,"column":21,"offset":2222},"end":{"line":101,"column":27,"offset":2228},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁 type 为 ","position":{"start":{"line":101,"column":30,"offset":2231},"end":{"line":101,"column":40,"offset":2241},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":101,"column":40,"offset":2241},"end":{"line":101,"column":48,"offset":2249},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":101,"column":48,"offset":2249},"end":{"line":101,"column":52,"offset":2253},"indent":[]}}],"position":{"start":{"line":101,"column":30,"offset":2231},"end":{"line":101,"column":52,"offset":2253},"indent":[]}}],"position":{"start":{"line":101,"column":1,"offset":2202},"end":{"line":101,"column":54,"offset":2255},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"height","position":{"start":{"line":102,"column":3,"offset":2258},"end":{"line":102,"column":9,"offset":2264},"indent":[]}}],"position":{"start":{"line":102,"column":3,"offset":2258},"end":{"line":102,"column":9,"offset":2264},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁矩形的长度","position":{"start":{"line":102,"column":12,"offset":2267},"end":{"line":102,"column":19,"offset":2274},"indent":[]}}],"position":{"start":{"line":102,"column":12,"offset":2267},"end":{"line":102,"column":19,"offset":2274},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":102,"column":22,"offset":2277},"end":{"line":102,"column":28,"offset":2283},"indent":[]}}],"position":{"start":{"line":102,"column":22,"offset":2277},"end":{"line":102,"column":28,"offset":2283},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁 type 为 ","position":{"start":{"line":102,"column":31,"offset":2286},"end":{"line":102,"column":41,"offset":2296},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":102,"column":41,"offset":2296},"end":{"line":102,"column":49,"offset":2304},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":102,"column":49,"offset":2304},"end":{"line":102,"column":53,"offset":2308},"indent":[]}}],"position":{"start":{"line":102,"column":31,"offset":2286},"end":{"line":102,"column":53,"offset":2308},"indent":[]}}],"position":{"start":{"line":102,"column":1,"offset":2256},"end":{"line":102,"column":55,"offset":2310},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"rx","position":{"start":{"line":103,"column":3,"offset":2313},"end":{"line":103,"column":5,"offset":2315},"indent":[]}}],"position":{"start":{"line":103,"column":3,"offset":2313},"end":{"line":103,"column":5,"offset":2315},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁椭圆的长轴半径","position":{"start":{"line":103,"column":8,"offset":2318},"end":{"line":103,"column":17,"offset":2327},"indent":[]}}],"position":{"start":{"line":103,"column":8,"offset":2318},"end":{"line":103,"column":17,"offset":2327},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":103,"column":20,"offset":2330},"end":{"line":103,"column":26,"offset":2336},"indent":[]}}],"position":{"start":{"line":103,"column":20,"offset":2330},"end":{"line":103,"column":26,"offset":2336},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁 type 为 ","position":{"start":{"line":103,"column":29,"offset":2339},"end":{"line":103,"column":39,"offset":2349},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":103,"column":39,"offset":2349},"end":{"line":103,"column":50,"offset":2360},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":103,"column":50,"offset":2360},"end":{"line":103,"column":54,"offset":2364},"indent":[]}}],"position":{"start":{"line":103,"column":29,"offset":2339},"end":{"line":103,"column":54,"offset":2364},"indent":[]}}],"position":{"start":{"line":103,"column":1,"offset":2311},"end":{"line":103,"column":56,"offset":2366},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"ry","position":{"start":{"line":104,"column":3,"offset":2369},"end":{"line":104,"column":5,"offset":2371},"indent":[]}}],"position":{"start":{"line":104,"column":3,"offset":2369},"end":{"line":104,"column":5,"offset":2371},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁椭圆的短轴半径","position":{"start":{"line":104,"column":8,"offset":2374},"end":{"line":104,"column":17,"offset":2383},"indent":[]}}],"position":{"start":{"line":104,"column":8,"offset":2374},"end":{"line":104,"column":17,"offset":2383},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":104,"column":20,"offset":2386},"end":{"line":104,"column":26,"offset":2392},"indent":[]}}],"position":{"start":{"line":104,"column":20,"offset":2386},"end":{"line":104,"column":26,"offset":2392},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"剪裁 type 为 ","position":{"start":{"line":104,"column":29,"offset":2395},"end":{"line":104,"column":39,"offset":2405},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":104,"column":39,"offset":2405},"end":{"line":104,"column":50,"offset":2416},"indent":[]}},{"type":"text","value":" 时生效","position":{"start":{"line":104,"column":50,"offset":2416},"end":{"line":104,"column":54,"offset":2420},"indent":[]}}],"position":{"start":{"line":104,"column":29,"offset":2395},"end":{"line":104,"column":54,"offset":2420},"indent":[]}}],"position":{"start":{"line":104,"column":1,"offset":2367},"end":{"line":104,"column":56,"offset":2422},"indent":[]}}],"position":{"start":{"line":94,"column":1,"offset":1836},"end":{"line":104,"column":56,"offset":2422},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"所有的裁剪类型都提供了默认值。下面代码演示在实例化图时全局配置 ","position":{"start":{"line":107,"column":1,"offset":2425},"end":{"line":107,"column":33,"offset":2457},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">clipCfg</code>","position":{"start":{"line":107,"column":33,"offset":2457},"end":{"line":107,"column":42,"offset":2466},"indent":[]}},{"type":"text","value":" 的最简形式:","position":{"start":{"line":107,"column":42,"offset":2466},"end":{"line":107,"column":49,"offset":2473},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":2425},"end":{"line":107,"column":49,"offset":2473},"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> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n nodes<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n <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\">100</span><span class=\"token punctuation\">,</span>\n shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'image'</span><span class=\"token punctuation\">,</span>\n label<span class=\"token punctuation\">:</span> <span class=\"token string\">'image'</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>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n container<span class=\"token punctuation\">:</span> <span class=\"token string\">'mountNode'</span><span class=\"token punctuation\">,</span>\n width<span class=\"token punctuation\">:</span> <span class=\"token number\">800</span><span class=\"token punctuation\">,</span>\n height<span class=\"token punctuation\">:</span> <span class=\"token number\">600</span><span class=\"token punctuation\">,</span>\n defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n <span class=\"token comment\">// shape: 'image', // 在数据中已经指定 shape,这里无需再次指定</span>\n clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</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>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\ngraph<span class=\"token punctuation\">.</span><span class=\"token function\">data</span><span class=\"token punctuation\">(</span>data<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\ngraph<span class=\"token punctuation\">.</span><span class=\"token function\">render</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":108,"column":1,"offset":2474},"end":{"line":131,"column":4,"offset":2841},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":4,"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":134,"column":6,"offset":2849},"end":{"line":134,"column":10,"offset":2853},"indent":[]}}],"position":{"start":{"line":134,"column":1,"offset":2844},"end":{"line":134,"column":10,"offset":2853},"indent":[]},"data":{"id":"裁剪类型","htmlAttributes":{"id":"裁剪类型"},"hProperties":{"id":"裁剪类型"}}},{"type":"heading","depth":5,"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":136,"column":7,"offset":2861},"end":{"line":136,"column":11,"offset":2865},"indent":[]}}],"position":{"start":{"line":136,"column":1,"offset":2855},"end":{"line":136,"column":12,"offset":2866},"indent":[]},"data":{"id":"圆形剪裁","htmlAttributes":{"id":"圆形剪裁"},"hProperties":{"id":"圆形剪裁"}}},{"type":"paragraph","children":[{"type":"html","value":"<code class=\"language-text\">circle</code>","position":{"start":{"line":137,"column":1,"offset":2867},"end":{"line":137,"column":9,"offset":2875},"indent":[]}},{"type":"text","value":"\n当剪裁配置 ","position":{"start":{"line":137,"column":9,"offset":2875},"end":{"line":138,"column":7,"offset":2882},"indent":[1]}},{"type":"html","value":"<code class=\"language-text\">clipCfg</code>","position":{"start":{"line":138,"column":7,"offset":2882},"end":{"line":138,"column":16,"offset":2891},"indent":[]}},{"type":"text","value":" 中的裁剪类型 ","position":{"start":{"line":138,"column":16,"offset":2891},"end":{"line":138,"column":24,"offset":2899},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">type</code>","position":{"start":{"line":138,"column":24,"offset":2899},"end":{"line":138,"column":30,"offset":2905},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":138,"column":30,"offset":2905},"end":{"line":138,"column":33,"offset":2908},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'circle'</code>","position":{"start":{"line":138,"column":33,"offset":2908},"end":{"line":138,"column":43,"offset":2918},"indent":[]}},{"type":"text","value":" 时,如下配置可以得到下图效果:","position":{"start":{"line":138,"column":43,"offset":2918},"end":{"line":138,"column":59,"offset":2934},"indent":[]}}],"position":{"start":{"line":137,"column":1,"offset":2867},"end":{"line":138,"column":59,"offset":2934},"indent":[1]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span>\n r<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":139,"column":1,"offset":2935},"end":{"line":145,"column":4,"offset":3006},"indent":[1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/244306/1569832291192-34209829-114c-495e-973a-e6cdbfeec0c1.png#align=left&display=inline&height=231&name=image.png&originHeight=462&originWidth=472&search=&size=125144&status=done&width=236","alt":"image.png","position":{"start":{"line":147,"column":1,"offset":3008},"end":{"line":147,"column":242,"offset":3249},"indent":[]}}],"position":{"start":{"line":147,"column":1,"offset":3008},"end":{"line":147,"column":242,"offset":3249},"indent":[]}},{"type":"heading","depth":5,"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":150,"column":7,"offset":3258},"end":{"line":150,"column":11,"offset":3262},"indent":[]}}],"position":{"start":{"line":150,"column":1,"offset":3252},"end":{"line":150,"column":12,"offset":3263},"indent":[]},"data":{"id":"矩形剪裁","htmlAttributes":{"id":"矩形剪裁"},"hProperties":{"id":"矩形剪裁"}}},{"type":"paragraph","children":[{"type":"html","value":"<code class=\"language-text\">rect</code>","position":{"start":{"line":151,"column":1,"offset":3264},"end":{"line":151,"column":7,"offset":3270},"indent":[]}}],"position":{"start":{"line":151,"column":1,"offset":3264},"end":{"line":151,"column":7,"offset":3270},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"当剪裁配置 ","position":{"start":{"line":153,"column":1,"offset":3272},"end":{"line":153,"column":7,"offset":3278},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">clipCfg</code>","position":{"start":{"line":153,"column":7,"offset":3278},"end":{"line":153,"column":16,"offset":3287},"indent":[]}},{"type":"text","value":" 中的裁剪类型 ","position":{"start":{"line":153,"column":16,"offset":3287},"end":{"line":153,"column":24,"offset":3295},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">type</code>","position":{"start":{"line":153,"column":24,"offset":3295},"end":{"line":153,"column":30,"offset":3301},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":153,"column":30,"offset":3301},"end":{"line":153,"column":33,"offset":3304},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":153,"column":33,"offset":3304},"end":{"line":153,"column":41,"offset":3312},"indent":[]}},{"type":"text","value":" 时,如下配置可以得到下图效果:","position":{"start":{"line":153,"column":41,"offset":3312},"end":{"line":153,"column":57,"offset":3328},"indent":[]}}],"position":{"start":{"line":153,"column":1,"offset":3272},"end":{"line":153,"column":57,"offset":3328},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'rect'</span><span class=\"token punctuation\">,</span>\n x<span class=\"token punctuation\">:</span> <span class=\"token operator\">-</span><span class=\"token number\">50</span><span class=\"token punctuation\">,</span>\n y<span class=\"token punctuation\">:</span> <span class=\"token operator\">-</span><span class=\"token number\">50</span><span class=\"token punctuation\">,</span>\n width<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span> \n height<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":154,"column":1,"offset":3329},"end":{"line":163,"column":4,"offset":3438},"indent":[1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/244306/1569832291263-32c9b20f-e374-42a7-874a-5c33a13e8b85.png#align=left&display=inline&height=204&name=image.png&originHeight=408&originWidth=310&search=&size=51708&status=done&width=155","alt":"image.png","position":{"start":{"line":164,"column":1,"offset":3439},"end":{"line":164,"column":241,"offset":3679},"indent":[]}}],"position":{"start":{"line":164,"column":1,"offset":3439},"end":{"line":164,"column":241,"offset":3679},"indent":[]}},{"type":"heading","depth":5,"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":166,"column":7,"offset":3687},"end":{"line":166,"column":11,"offset":3691},"indent":[]}}],"position":{"start":{"line":166,"column":1,"offset":3681},"end":{"line":166,"column":12,"offset":3692},"indent":[]},"data":{"id":"椭圆剪裁","htmlAttributes":{"id":"椭圆剪裁"},"hProperties":{"id":"椭圆剪裁"}}},{"type":"paragraph","children":[{"type":"html","value":"<code class=\"language-text\">ellipse</code>","position":{"start":{"line":167,"column":1,"offset":3693},"end":{"line":167,"column":10,"offset":3702},"indent":[]}}],"position":{"start":{"line":167,"column":1,"offset":3693},"end":{"line":167,"column":10,"offset":3702},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"当剪裁配置 ","position":{"start":{"line":169,"column":1,"offset":3704},"end":{"line":169,"column":7,"offset":3710},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">clipCfg</code>","position":{"start":{"line":169,"column":7,"offset":3710},"end":{"line":169,"column":16,"offset":3719},"indent":[]}},{"type":"text","value":" 中的裁剪类型 ","position":{"start":{"line":169,"column":16,"offset":3719},"end":{"line":169,"column":24,"offset":3727},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">type</code>","position":{"start":{"line":169,"column":24,"offset":3727},"end":{"line":169,"column":30,"offset":3733},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":169,"column":30,"offset":3733},"end":{"line":169,"column":33,"offset":3736},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'ellipse'</code>","position":{"start":{"line":169,"column":33,"offset":3736},"end":{"line":169,"column":44,"offset":3747},"indent":[]}},{"type":"text","value":" 时,如下配置可以得到下图效果:","position":{"start":{"line":169,"column":44,"offset":3747},"end":{"line":169,"column":60,"offset":3763},"indent":[]}}],"position":{"start":{"line":169,"column":1,"offset":3704},"end":{"line":169,"column":60,"offset":3763},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\">clipCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n type<span class=\"token punctuation\">:</span> <span class=\"token string\">'ellipse'</span><span class=\"token punctuation\">,</span>\n rx<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span>\n ry<span class=\"token punctuation\">:</span> <span class=\"token number\">60</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":170,"column":1,"offset":3764},"end":{"line":177,"column":4,"offset":3847},"indent":[1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/244306/1569832291204-bd1e7dbe-a3b5-47c6-9b46-143ed018226d.png#align=left&display=inline&height=199&name=image.png&originHeight=398&originWidth=486&search=&size=88894&status=done&width=243","alt":"image.png","position":{"start":{"line":178,"column":1,"offset":3848},"end":{"line":178,"column":241,"offset":4088},"indent":[]}}],"position":{"start":{"line":178,"column":1,"offset":3848},"end":{"line":178,"column":241,"offset":4088},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":179,"column":1,"offset":4089}}}}