Custom Renderer with Angular 5

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 Likes

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

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

Hi, Were you able to implement custom renderer in Typescript? I am also trying to develop the same in Angular 7, any help would be appreciated.

1 Like

Please do not necrobump old topics. Instead link to this thread from new topic.