forked from fanruan/fineui
iapyang
7 years ago
5 changed files with 58 additions and 58 deletions
@ -1,2 +1,5 @@
|
||||
# FineUIdocs |
||||
FineUI的交互、前端以及视觉文档规范 |
||||
|
||||
####1. 控件都会提供setValue, getValue, populate这几个方法来设置值,获取值(展示类控件除外)和刷新控件 |
||||
####2. 控件都会提供setEnable, setVisible, setValid这几个方法来设置使能,是否可见,是否有效状态,并且在fineui2.0之后,会自动给子组件设置同样的状态,不要重写这些方法,一些需要在设置状态时的额外操作可以通过重写_setXXX来实现 |
||||
|
@ -1,2 +1,37 @@
|
||||
# complex_canvas |
||||
|
||||
## 复杂的canvas绘图 |
||||
|
||||
{% method %} |
||||
[source](https://jsfiddle.net/fineui/psozjkgn/) |
||||
|
||||
{% common %} |
||||
```javascript |
||||
|
||||
var canvas = BI.createWidget({ |
||||
type: "bi.complex_canvas", |
||||
width: 500, |
||||
height: 600 |
||||
}); |
||||
canvas.branch(55, 100, 10, 10, 100, 10, 200, 10, { |
||||
offset: 20, |
||||
strokeStyle: "red", |
||||
lineWidth: 2 |
||||
}); |
||||
|
||||
canvas.stroke(); |
||||
|
||||
|
||||
``` |
||||
|
||||
{% endmethod %} |
||||
|
||||
## 对外方法 |
||||
| 名称 | 说明 | 回调参数 |
||||
| :------ |:------------- | :----- |
||||
| branch | 绘制树枝节点| (x0, y0, x1, y1, x2, y2) (以x0, y0为根节点,分支到x1,y1, x2,y2...)| |
||||
| stroke | 绘制 | | |
||||
|
||||
--- |
||||
|
||||
|
||||
|
Loading…
Reference in new issue