new KonvaLine()
Methods
-
addPoints(points)
-
Add points to the Line
Parameters:
Name Type Description points
Object array of points
-
delete()
-
Delete current Markup object
-
enableMouseEditing(value)
-
Set Mouse editing feature
Parameters:
Name Type Description value
true / false
-
getColor()
-
Get color of the Markup instance
-
getLineType()
-
Get Type of the Line. Available values:
solid
,dot
,dash
. Default issolid
-
getLineWidth()
-
Get Line width. Default value is 4
-
getPoints()
-
Get points of the Line
-
getRotation()
-
Get rotation of the Markup object
-
getZIndex()
-
Get Z-Index of the Markup object
-
id()
-
Get an internal identificator of the object. Not unique
-
ref()
-
Link to Library object
-
setColor(hex)
-
Set color of the Markup instance
Parameters:
Name Type Description hex
color in #hex format. Default:
#ff0000
-
setLineType(type)
-
Set Type of the Line. Available values:
solid
,dot
,dash
. Default issolid
Parameters:
Name Type Description type
Default is
solid
-
setLineWidth(size)
-
Set Line width. Default value is 4
Parameters:
Name Type Description size
value of width
-
setRotation(degrees)
-
Set rotation of the Markup object
Parameters:
Name Type Description degrees
number of degress to rotate
-
setZIndex(zIndex)
-
Set Z-Index of the Markup object
Parameters:
Name Type Description zIndex
integer value of Z-Index
-
type()
-
Get type of the Markup object