/** * Setup arrow head and define the marker. The result is appended to the svg. */ // import { log } from '../logger'; // Only add the number of markers that the diagram needs const insertPatterns = (elem, patternArray, type, id) => { patternArray.forEach((patternName) => { patterns[patternName](elem, type, id); }); }; { /* {' '} {' '} {' '} {' '} {' '} {' '} {' '} ; */ } const dots = (elem, type) => { elem .append('defs') .append('marker') .attr('id', type + '-barbEnd') .attr('refX', 19) .attr('refY', 7) .attr('markerWidth', 20) .attr('markerHeight', 14) .attr('markerUnits', 0) .attr('orient', 'auto') .append('path') .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); }; // TODO rename the class diagram markers to something shape descriptive and semanitc free const patterns = { dots, }; export default insertPatterns;