Class: Tag

Konva. Tag


new Tag(config)

Tag constructor.  A Tag can be configured
to have a pointer element that points up, right, down, or left

Parameters:
Name Type Description
config Object
Properties
Name Type Argument Description
pointerDirection String <optional>

can be up, right, down, left, or none; the default
is none. When a pointer is present, the positioning of the label is relative to the tip of the pointer.

pointerWidth Number <optional>
pointerHeight Number <optional>
cornerRadius Number <optional>
Source:
konva.js

Methods


cornerRadius(cornerRadius)

get/set cornerRadius

Parameters:
Name Type Description
cornerRadius Number
Source:
konva.js
Returns:
Type
Number
Example
tag.cornerRadius(20);

pointerDirection(pointerDirection)

get/set pointer direction

Parameters:
Name Type Description
pointerDirection String

can be up, right, down, left, or none. The default is none.

Source:
konva.js
Returns:
Type
String
Example
tag.pointerDirection('right');

pointerHeight(pointerHeight)

get/set pointer height

Parameters:
Name Type Description
pointerHeight Number
Source:
konva.js
Returns:
Type
Number
Example
tag.pointerHeight(20);

pointerWidth(pointerWidth)

get/set pointer width

Parameters:
Name Type Description
pointerWidth Number
Source:
konva.js
Returns:
Type
Number
Example
tag.pointerWidth(20);