Hi, I recently upgrade from bpmn-js v0.16.2 to v.0.18.4, and my custom color marker is not working.
Some key code:
viewer.get(‘canvas’).addMarker(‘node_id’, ‘activeNodes’);
.activeNodes:not(.djs-connection) .djs-visual > :nth-child(2) {
fill: #fff;
}
I noticed that the default “rect” element style is changed before the two version and now it is hard to use marker to change the style.
I don’t want to use !important syntax to override since I will have another style added as marker e.g. completedNodes to the element.
Anyone has such experience?
Thank you for your reply,
In this way, can we also set the text color of the node?
And does it mean that adding color with marker and overlay as it is shown in the bpmn-js-example project is no longer supported? if so, could you also update the example project to eliminate the confusion.
Besides, the bpmn-js github shows many version tags e.g. v0.20.0, but the bpmn.io demo shows the currently version is v0.18.4, does it also means this version is more stable and recommended?
Adding colors using markers (CSS classes) and overlays will always be an alternative but you’re right, right now it’s causing confusion and I’ve already considered removing the example.
The latest version is v0.21.0 and it’s considered stable. The bpmn.io demo application is frequently updated to always use the latest version of bpmn-js. It uses v0.21.0, I’ve updated it a few days ago. Where did you see v0.18.4?
Sorry for late reply. I saw the v0.18.4 from the bpmn.io demo --> Download page, but it was updated after your reply, so I am not sure what happened before.
As for the text color and stroke color, I would suggest it would be better to separate these two colors for a more clear color coding.