Custom Renderer with Angular 5


#1

I am implementing Angular 5 app on top of bpmn-js.
I took as starting point Narve’s project : https://github.com/narve/angular-bpmn

I need to develop CustomRender.
At the bpmn load time is invoked BpmnRenderer instead of CustomRender, althought it is being constructed and initated by Diagram.js.
Why could it be?
How does injection mechanism knows to inject CustomRender?

I followed the js example:

export const extentionModule = {
  __init__: [
    'customRenderer'
  ],
  customRenderer: ['type', CustomRenderer]
}
this.modeler = new Modeler(additionalModules: [  
         extentionModule
      ]);

The missing part above is : inherits(CustomRenderer, BaseRenderer);.

CustomRenderer is being constructed.
However it’s methods : canRender / drawShape are not being called

Does anyone have working example?
Can anyone guide me how to implement it properly in Angular?


#2

What does you custom renderer look like? We have an example of a custom renderer that you should check out.


#3

Thank you for your response.
I viewed the above example and am trying to implement it in typescript inside Angular 5 app.