feature~CurveFlag(coordinates, attributes, symbol)

曲线旗标

Summary

Methods:
getAttributes

获得要素的自定义属性

getCoordinates

获取坐标数组

getElement

获取DOM元素

getId

获取唯一标识

getSymbol

获得定义的样式对象

getType

获取要素类型

getVisibility

获得要素的可见性

setAttributes

设置要素的自定义属性

setCoordinates

设置控制点坐标数组

setSymbol

设置样式

setVisibility

设置元素的可见性

Constructor

new CurveFlag(coordinates, attributes, symbol)

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

控制点数组[[x,y],[x1,y1]],控制点数量为2,且不可以重复

attributes Object

自定义属性

symbol Object

样式定义

Name Type Description
color String

填充颜色, 默认黄色,格式为"rgb(255,255,255)"|"#ffffff"格式

opacity Number

填充颜色透明度,默认为1

outline Object

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

Throws:
RangeError -

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

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

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

可见性