x coordinate of the marker's center.
y coordinate of the marker's center.
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.
For bitmap images this holds the base64 encoded image.
Technically this could be any URL but due to browser security constraints an external image will almost certainly cause bitmap rendering of the image to fail.
In cases you know you will never render the annotation as a static image, it should be safe to use external URLs. Otherwise, use base64 encoded images like 'data:image/png;base64,...'.
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.
For SVG images this holds the SVG markup of the image.
Returns marker type name for the object instance.
Protected
visualContainer for the marker's visual.
Protected
addAdjusts the image size and position.
Adjusts marker's visual according to the current state (color, width, etc.).
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.
Protected
createCreates the image element based on the image type and source.
Creates marker's visual, including its image element.
Disposes the marker and cleans up.
Returns markers bounding box.
Override to return a custom bounding box.
rectangle fitting the marker.
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.
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
Adjusts marker's size.
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
Optional
_imageFor bitmap images this holds the base64 encoded image.
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.
Protected
Optional
_svgFor SVG images this holds the SVG markup of the image.
Static
applyWhen true, the default filter is applied to the marker's visual.
The default marker size when the marker is created with a click (without dragging).
Marker height.
Protected
imageType of the image: SVG or bitmap.
x coordinate of the top-left corner.
Protected
naturalNatural (real) height of the image.
Protected
naturalNatural (real) width of the image.
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.
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
).
Protected
Optional
SVGImageMain SVG or image element of the marker.
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.
X mark image marker.