Custom renderer does not take an effect after update

I have updated from 0.18.4 to 0.19.0 and the custom renderer from your colors example stopped working… Is there any other way how to influence the appearance of the tasks? Thanks in advance!

We’ll look into this. I guess you refer to our color example?

Yes, the custom renderer like in this example: https://github.com/bpmn-io/bpmn-js-task-priorities/blob/master/lib/priorities/ColorRenderer.js

Thank you for any advice.

Please, we still did not updated bpmn-js (and thus bpmn-js-properties-panel, bpmn-moddle and diagram-js also) in our project because of the impossibility of using the custom renderer. Is it still functional in the way you present at https://github.com/bpmn-io/bpmn-js-task-priorities/blob/master/lib/priorities/ColorRenderer.js ? The method this.drawShape is not being fired anymore. Thank you in advance for any advice.

Not really sure what you’re doing. I’ve just updated the task priorities example and it still works works like a charm with the latest version of bpmn-js.

Update: I can reproduce it now. Investigating…

So after a little bit of investigation I’ve upgraded the example to the latest version of bpmn-js.

The change impacting it’s functionality is the switch away from the underlying SVG rendering layer we performed with bpmn-js v0.18.0. Please read about the change, as it may impact you if you plan to upgrade the library.

Best,

Nico

Thank you very much for the tip and the upgrade, I’ll look at it a little bit deeper.

Best

Ok, for the case somebody will have the same problem, my problem was that I did not notice the order of arguments changed from

function CustomRenderer(eventBus, styles, pathMap) {

    BpmnRenderer.call(this, eventBus, styles, pathMap, 1200);
...

to

function CustomRenderer(eventBus, styles, pathMap, canvas, priority) {

    BpmnRenderer.call(this, eventBus, styles, pathMap, canvas, priority || 1200);
...

and as a result required canvas injecting:

CustomRenderer.$inject = [ 'eventBus', 'styles', 'pathMap', 'canvas' ];

Thank you for the assistance, the example upgrade really helped!