x coordinate of the marker's center.
y coordinate of the marker's center.
Returns markers's text color.
Sets the markers's text color.
SVG container object holding the marker's visual.
Fill color of the marker.
In a derived class override applyFillColor to apply the color to the marker's visual.
Returns the markers's font family.
Sets the markers's font family.
Returns the marker's font size.
Opacity of the marker.
In a derived class override applyOpacity to apply the opacity to the marker's visual.
Stroke (outline) color of the marker.
In a derived class override applyStrokeColor to apply the color to the marker's visual.
Stroke (outline) dash array of the marker.
In a derived class override applyStrokeDasharray to apply the dash array to the marker's visual.
Stroke (outline) width of the marker.
In a derived class override applyStrokeWidth to apply the width to the marker's visual.
Returns the marker's text.
Sets the marker's text.
Returns marker type name for the object instance.
Protected
visualContainer for the marker's visual.
Protected
addAdjusts marker's visual according to the current state.
Protected
applyApplies the fill color to the marker's visual.
Override this method in a derived class to apply the color to the marker's visual.
Protected
applyApplies the opacity to the marker's visual.
Override this method in a derived class to apply the opacity to the marker's visual
Protected
applyApplies the stroke color to the marker's visual.
Override this method in a derived class to apply the color to the marker's visual.
Protected
applyApplies the stroke dash array to the marker's visual.
Override this method in a derived class to apply the dash array to the marker's visual.
Protected
applyApplies the stroke width to the marker's visual.
Override this method in a derived class to apply the width to the marker's visual.
Creates marker's visual.
Disposes the marker and cleans up.
Returns markers bounding box.
Override to return a custom bounding box.
rectangle fitting the marker.
Protected
getReturns the default text for the marker type.
marker type's default text.
When overridden in a derived class, represents a preliminary outline for markers that can be displayed before the marker is actually created.
SVG path string.
Returns current marker state that can be restored in the future.
Hides the marker's visual.
Used when editing the text.
Moves visual to the specified coordinates.
coordinates of the new top-left corner of the visual.
Returns true if passed SVG element belongs to the marker. False otherwise.
target element.
true if the element belongs to the marker.
Restores previously saved marker state.
previously saved state.
Rotates marker around the center.
coordinates of the rotation point.
Scales marker. Used after resize.
horizontal scale
vertical scale
Sets the text color.
text color
Sets the font family.
font family string
Sets (adjusts) the marker's size.
Protected
setSets the marker's size based on the text size.
Protected
setSets the text bounding box.
Shows the marker's visual.
Eg. when done editing the text.
Protected
_containerSVG container object holding the marker's visual.
It is created and passed to the constructor by marker editor or viewer when creating the marker.
Protected
_fillFill color of the marker.
Protected
_opacityOpacity of the marker.
Protected
_strokeStroke (outline) color of the marker.
Protected
_strokeStroke (outline) dash array of the marker.
Protected
_strokeStroke (outline) width of the marker.
Static
applyWhen true, the default filter is applied to the marker's visual.
Protected
Static
DEFAULT_Default text for the marker type.
The default marker size when the marker is created with a click (without dragging).
Marker height.
x coordinate of the top-left corner.
Optional
notesAdditional information about the marker.
Generally, this isn't used for anything functional. However, in a derived type it could be used for storing arbitrary data with no need to create extra properties and state types.
Optional
onCallback to be called when the text size changes.
Text padding from the bounding box.
Marker's rotation angle.
Marker lifecycle stage.
Most markers are created immediately after the user clicks on the canvas (normal
).
However, some markers are only finished creating after additional interactions (creating
).
Text block handling the text rendering.
Text's bounding box where text should fit and/or be anchored to.
Static
titleMarker type title (display name) used for accessibility and other attributes.
y coordinate of the top-left corner.
Static
typeMarker type name.
It's important to set this in each derived class. This value is used to identify marker types when restoring marker state and other scenarios.
Marker width.
Text marker.
Used to represent a text block as well a base class for other text-based markers.