Change element attributes on bpmn-js - bpmn-viewer v0.20.5


I’m having trouble setting attributes - like the stroke color - for a BPMNEdge and/or BPMNLabel canvas element. Is this functionality available within v.020.5? If so, could you give me an example?

Kind regards, Giovanni


Have a look at the tests for setting colors in order to see how it’s done.

The basic syntax is:

modeling.setColor(myShape, { fill: 'red', stroke: 'blue' });