Summary
Methods:
| getAttributes |
获得要素的自定义属性 |
| getCoordinates |
获取坐标数组 |
| getElement |
获取DOM元素 |
| getId |
获取唯一标识 |
| getSymbol |
获得定义的样式对象 |
| getType |
获取要素类型 |
| getVisibility |
获得要素的可见性 |
| setArrowRatio |
这是折线箭头曲线末尾两点长度与宽度的比值 |
| setAttributes |
设置要素的自定义属性 |
| setCoordinates |
设置控制点坐标数组 |
| setSymbol |
设置样式 |
| setVisibility |
设置要素的可见性 |
Constructor
new PolylineArrow(coordinates, attributes, symbol)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coordinates |
Array.<Array.<Number>> | 控制点数组[[x,y],[x1,y1]]; |
||||||||||||||||||||||||
attributes |
Object | 自定义属性 |
||||||||||||||||||||||||
symbol |
Object | 样式定义
|
Throws:
数据长度小于2的时候抛出异常
Example
let sArrowGeom = new hpano.feature.PolylineArrow([point1,point2]);
Methods
-
getAttributes() → {Object}
-
获得要素的自定义属性
Returns:
Object -
getCoordinates()
-
获取坐标数组
-
getElement() → {Object}
-
获取DOM元素
Returns:
Object -DOM元素
-
getId() → {String}
-
获取唯一标识
Returns:
String -
getSymbol() → {Object}
-
获得定义的样式对象
Returns:
Object -
getType() → {String}
-
获取要素类型
Returns:
String -
getVisibility() → {Boolean}
-
获得要素的可见性
Returns:
Boolean -
setArrowRatio(ratio)
-
这是折线箭头曲线末尾两点长度与宽度的比值
Parameters:
Name Type Description ratioNumber 长/宽比率
-
setAttributes(attributes)
-
设置要素的自定义属性
Parameters:
Name Type Description attributesObject -
setCoordinates(coordinates)
-
设置控制点坐标数组
Parameters:
Name Type Description coordinatesArray.<Array.<Number>> 坐标数组
-
setSymbol(symbol)
-
设置样式
Parameters:
Name Type Description symbolObject 样式定义
Name Type Description colorString 填充颜色,不生效图片和自定义样式 默认黄色,格式为"rgb(255,255,255)"|"#ffffff"格式
opacityNumber 填充颜色透明度,默认为1,注意填充样式类型为
outlineObject 填充线样式,参数按照线要素的样式定义
Throws:
样式传入错误的话抛出异常
-
setVisibility(visible)
-
设置要素的可见性
Parameters:
Name Type Description visibleBoolean 可见性