From 9a1fc41860a8fe8c7e858e0541d5b8967a500394 Mon Sep 17 00:00:00 2001 From: 2912401452 <2912401452@qq.com> Date: Mon, 18 Apr 2022 18:57:29 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20arrow=20=E7=9A=84?= =?UTF-8?q?=20tailWidth=20=E9=85=8D=E7=BD=AE=E4=BB=A5=E5=8F=8A=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=20demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/line_layer/path.zh.md | 7 ++++--- examples/line/path/demo/arrow.js | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/api/line_layer/path.zh.md b/docs/api/line_layer/path.zh.md index 56e7023715..44a95b109a 100644 --- a/docs/api/line_layer/path.zh.md +++ b/docs/api/line_layer/path.zh.md @@ -65,16 +65,17 @@ layer.size('height', []); // 配置箭头 IArrowOption layer.style({ arrow: { - enable: true, // 是否开启箭头、默认为 false - arrowWidth: 2, // 箭头的宽度、默认值为 2、与线的 size 相关 + enable: true, // 是否开启箭头、默认为 false + arrowWidth: 2, // 箭头的宽度、默认值为 2、与线的 size 相关 arrowHeight: 3, // 箭头的高度、默认值为 3、与线的 size 相关 + tailWidth: 1, // 配置箭头的时候支持设置线尾部的宽度 }, }); ``` [在线案例](/zh/examples/line/path#arrow) -参数 +参数 为了构造箭头,我们会在处理数据的时候插入多余的节点用于构造节点(为了不增加额外的消耗,普通线不会进行插入操作)。 diff --git a/examples/line/path/demo/arrow.js b/examples/line/path/demo/arrow.js index 03c4f7cc43..052c3c373b 100644 --- a/examples/line/path/demo/arrow.js +++ b/examples/line/path/demo/arrow.js @@ -123,13 +123,14 @@ const lineLayer = new LineLayer({}) ] } ) - .size(1.5) + .size(2) .shape('line') .style({ arrow: { enable: true, arrowWidth: 4, - arrowHeight: 6 + arrowHeight: 4, + tailWidth: 0.4 } }) .color('#f00');