Replies: 1 comment 2 replies
-
I do not think we support markerEnd and markerStart. What are those? do you have reference to SVG specs that talk about those? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to import an SVG using Fabric.js, and while the elements in the SVG are displayed, the RectStartArrow_ defined in the is not displayed correctly. How can I solve this problem? Below is a simple example of my code.
import * as fabric from 'fabric'
const canvas = new fabric.Canvas('myCanvas');
const svgString =
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> <defs> <marker id="RectStartArrow_" refX="5" refY="6" orient="auto" markerWidth="10" markerHeight="10"> <path d="M5 0 L5 6 L5 12 L5 6 L2 12 L8 0" fill="red" /> </marker> <marker id="RectEndArrow_" refX="5" refY="6" orient="auto" markerWidth="10" markerHeight="10"> <path d="M5 0 L5 6 L5 12 L5 6 L8 12 L2 0" fill="red" /> </marker> </defs> <line x1="10" y1="10" x2="190" y2="10" stroke="#000" strokeWidth="2" markerStart="url(#RectStartArrow_)" markerEnd="url(#RectEndArrow_)" /> </svg>
;async function loadSvg(dataText) {
if (!dataText) {
return;
}
}
loadSvg(svgString);
Beta Was this translation helpful? Give feedback.
All reactions