feature~BezierCurveArrow(coordinates, attributes, symbol)

贝塞尔曲线箭头

Summary

Methods:
getAttributes

获得要素的自定义属性

getCoordinates

获取坐标数组

getElement

获取DOM元素

getId

获取唯一标识

getSymbol

获得定义的样式对象

getType

获取要素类型

getVisibility

获得要素的可见性

setArrowRatio

这是箭头曲线末尾两点长度与宽度的比值

setAttributes

设置要素的自定义属性

setCoordinates

设置控制点坐标数组

setSymbol

设置样式

setVisibility

设置要素的可见性

Constructor

new BezierCurveArrow(coordinates, attributes, symbol)

Parameters:
Name Type Description
coordinates Array.<Array.<Number>>

控制点数组[[x,y],[x1,y1]];

attributes Object

自定义属性

symbol Object

样式定义

Name Type Description
color String

线段颜色,格式为"rgb(255,255,255)"|"#ffffff"格式,默认红色

width Number

线宽

styleType String

线类型,默认:'solid',可选值:可选值:实线"solid"|破折线"dash"|点"dot"|长破折线"long-dash"|长点"lang-dot"|长破折点"long-dash-dot"|短破折"short-dash"|短破折点"short-dash-dot"|短点"short-dot",

lineCap String

折线的终点,或者是不连接其他线段的线段的终点,默认值:'round',可选值:线条的两端为平行的边缘:'butt'|线条的两端添加半圆形线帽'round'|线条的两端添加正方形线帽'square',

lineJoin String

指定折线连接样式,默认值'bevel',可选值:斜角:'bevel'|圆角:'miter'|尖角:'round'

miterLimit Number

斜接连接线宽与线宽的最大比例,默认为2

opacity Number

透明度 默认1

Throws:
RangeError -

数据长度小于2的时候抛出异常

Example
let sArrowGeom = new hpano.feature.BezierCurveArrow([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
ratio Number

长/宽比率

setAttributes(attributes)

设置要素的自定义属性

Parameters:
Name Type Description
attributes Object

setCoordinates(coordinates)

设置控制点坐标数组

Parameters:
Name Type Description
coordinates Array.<Array.<Number>>

坐标数组

setSymbol(symbol)

设置样式

Parameters:
Name Type Description
symbol Object

样式定义

Name Type Description
color String

填充颜色,不生效图片和自定义样式 默认黄色,格式为"rgb(255,255,255)"|"#ffffff"格式

opacity Number

填充颜色透明度,默认为1,注意填充样式类型为

outline Object

填充线样式,参数按照线要素的样式定义

Throws:

样式传入错误的话抛出异常

setVisibility(visible)

设置要素的可见性

Parameters:
Name Type Description
visible Boolean

可见性