Usage of tiny svg module in dmn-js

Hi there!
I’m struggling a bit with the usage of tiny-svg within dmn-js. I came across the DrdRednderer.js and i cannot figure out the meaning of attrs in the svgAttr function. Can someone help me out understanding how to use tiny-svg and maybe explain what, for example, the meaning of the second parameter in svgAttr(associationStart, { d: 'M 11 5 L 1 10 L 11 15' }); is?

thanks in advance.

For that it’s always a good idea to have a look at the tests: tiny-svg/attr.js at master · bpmn-io/tiny-svg · GitHub They can tell you a lot about how something is supposed to be used.

attr(myRect, 'x', 100) is equivalent to attr(myRect, { x: 100 }). It’s a simple helper for setting attributes of SVG elements. The result would be <rect x="100" />.