I got some code that generates pathes on canvas. the path objects looks similar to this :
<path class="link" d="M450,215.L265,236L225,236" style="stroke-width: 1;"></path>
and on view (a,b,c letters are just for explaining the problem):
My problem is that I want to draw some arrow (marker) on the middle of the line, between "a" to "b", but when I create a marker and do a marker-mid attribute, its generates on b point.
I've tried to do some point between a and b, but then marker-mid did the arrows both there and both on b point.
from WEB API documentation :
The marker-mid defines the arrowhead or polymarker that shall be drawn at every vertex other than the first and last vertex of the given element or basic shape.
How can I disable the marker on point b? Or how can I make something like arrow between a-b ? Thanks !
sometimes its not so easy to split the path at any point you like. Then you can use text on a path with
startOffset
to position an "arrow" at any point on a path...You are drawing a line with vertices
A
,B
, andC
, so by definition the marker will be drawn atB
.If you want a marker to be drawn between
A
andB
you will need to draw apath
fromA
to the midpointAB
toB
.