eventBus.on is not a function
Kelly0721 opened this issue · comments
when I run the example of bpmn-js-in-color, it can work successfuly.But when I try to import the color moduler into my project, it always appear this error
when I run the example of bpmn-js-in-color, it can work successfuly.But when I try to import the color moduler into my project, it always appear this error
I meet the same problem, how did you solved it, thank you.
The same error for me. I have a workaround in case you have not resolved yet.
The same error for me. I have a workaround in case you have not resolved yet.
No, I haven't. please tell me how to solve it?
I did the following modifications:
node_modules/bpmn-js-in-color/colors/ColorRenderer.js (line 14): (this is why 'eventBus.on is not a function')
// BpmnRenderer.call(this, eventBus, styles, pathMap, canvas);
BpmnRenderer.call(this, config, eventBus, styles, pathMap, canvas, textRenderer, callPriority);
After this change I got other errors related to popup menu and color setting, so:
node_modules/bpmn-js-in-color/colors/ColorContextPadProvider.js (line 36):
// var colorPicker = self._popupMenu.create('color-picker', element);
node_modules/bpmn-js-in-color/colors/ColorContextPadProvider.js (line 48):
// colorPicker.open(opts, element);
self._popupMenu.open(element, 'color-picker', opts);
node_modules/bpmn-js-in-color/colors/ColorPopupProvider.js (line 90):
// modeling.updateProperties(element, {
// di: {
// 'xmlns:color': ns,
// 'color:background-color': newColor
// }
// });
modeling.setColor(element, {
fill: newColor
});