bpmn-visualization-js icon indicating copy to clipboard operation
bpmn-visualization-js copied to clipboard

[FEAT] Configure programatically the style of a Shape/Edge

Open csouchet opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. We want to customize a Shape/Edge giving the CSS content programatically, and not with the CSS class (already managed by #942).

Describe the solution you'd like To do that, we can do something like done on the G6 Shape:

IMPORTANT: the API design must be discussed prior starting the implementation

api.updateShape(
  <'#shape_id' | Array of ids >, 
  {
      fill: 'red',
      shadowOffsetX: 10,
      shadowOffsetY: 10,
      shadowColor: 'blue',
      shadowBlur: 10,
      opacity: 0.8,
    }
);

api.updateEdge(
   <'#edge_id' | Array of ids >, 
   {
      fill: 'red',
      shadowOffsetX: 10,
      shadowOffsetY: 10,
      shadowColor: 'blue',
      shadowBlur: 10,
      opacity: 0.8,
    },
   <ALL | ARROW | LINE >
);

csouchet avatar Jan 18 '21 10:01 csouchet