I am using makerjs for the svg maker. below example I am adding two lines and polygon shape. below code will create svg with 3 path node under the svg tag.
layer is the id assigned to node. Question here is how can I apply class or custom attributes to path node?
var modelSD: IModel = {
models: {
polygon: shape,
lines: {
paths: {
line1: new paths.Line([0, 10], [15, 30]),
line2: new paths.Line([50, 40], [90, 120]),
},
layer:'lines-id'
},
},
};
const svg = exporter.toSVG(modelSD, { annotate: true })
i.e. current output is
<svg> <path id="p1" d="..."/> <path id="p1" d="..."/> <path id="p1" d="..."/> </svg>
Expected should be
<svg> <path class="custom-lines" id="p1" d="..."/> <path class="custom-lines" id="p1" d="..."/> <path class="custom-lines" id="p1" d="..."/> </svg>