Hello, how do I change the element style?


#1

I need to change the color of each element to this.
%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20181102105232

And change the lines that have been executed into this.
QQ%E6%88%AA%E5%9B%BE20181102165858

How do I do that?
Thank you


#2

The modeling API allows you to change an elements color:

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

#3

I can’t get modeling.
image

The plug-in I use is “bpmn-js/lib/NavigatedViewer.js”

My code

this.viewer = new Modeler({
    container: this.$refs.diagramCanvas
});
      
this.modeling= this.viewer.get('modeling');

#4

The navigated viewer doesn’t have modeling since it doesn’t allow modeling. Use Modeler instead.