Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function TextOnChain(font, text, fontSize, baseline, reversed, contain, rotate, svgPathData, showPath) {
var textModel = new makerjs.models.Text(font, text, fontSize);
var svgPath = makerjs.importer.fromSVGPathData(svgPathData);
var chain = makerjs.model.findSingleChain(svgPath);
makerjs.layout.childrenOnChain(textModel, chain, baseline, reversed, contain, rotate);
this.models = {
text: textModel
};
if (showPath) {
this.models.svgPath = svgPath;
}
}