Marker
The marker instance.
- Marker
- new Marker(pos,imgUrl,width,height)
- .hotPos ⇒
number[] - .id ⇒
string - .imageUrl ⇒
string - .image ⇒
html image element - .isFixedSize ⇒
boolean - .moveable ⇒
boolean - .parentShape ⇒
Shape - .position ⇒
Point - .scale ⇒
number - .type ⇒
int - .parentShape ⇒
Shape
#.new Marker(pos,imgUrl,width,height)
| Param | Type | Default | Description |
|---|---|---|---|
| pos | Point |
coordinates of the marker | |
| imgUrl | string |
custom image URL of the marker | |
| width | int |
60 | optional the image width. |
| height | int |
60 | optional the image height. |
| hotPos | number[] |
optional the hot position [x, y], it start at the upper-left corner (0,0) of the marker image |
#.id
Get or set the marker's unique id.
Kind: instance property of Marker
Returns: string - returns the marker id
#.position
Get the marker position coordinate in the diagram view.
Kind: instance property of Marker
Returns: object - returns the marker position coordinate
#.imageUrl
Get or set the custom marker image URL.
Kind: instance property of Marker
Returns: string - returns the marker image URL
#.image
Get the marker image.
Kind: instance property of Marker
Returns: object - returns the marker image DOM element
#.type
Get the shape's type of marker. Default value is 1020.
Kind: instance property of Marker
Returns: int - returns the shape's type
#.parentShape
Get the parent shape of the marker.
Kind: instance property of Marker
Returns: Shape - returns the parent shape
#.moveable
Get or set the moveable value. If the value is true, the marker object is moveable in the diagram.
Kind: instance property of Marker
Returns: boolean - returns true or false
#.hotPos
Get or set the hot position [x, y]
It start at the upper-left corner (0,0) of the marker image
Kind: instance property of Marker
Returns: number[] - returns the marker hot position
#.isFixedSize
Get or set whether the size of the marker image is fixed. Default is true.
Kind: instance property of Marker
Returns: boolean - returns true or false
#.scale
Get or set the marker scale
Max scale is 5.0, min scale is 0.2
Kind: instance property of Marker
Returns: number - returns the marker scale