chore(draw): retrieve default colors from bpmnRenderer config

Related to #713
This commit is contained in:
Nico Rehwaldt 2018-05-24 15:02:02 +02:00
parent 290b2f6121
commit 0b66b77483
2 changed files with 4 additions and 4 deletions

View File

@ -73,8 +73,8 @@ export default function BpmnRenderer(
BaseRenderer.call(this, eventBus, priority); BaseRenderer.call(this, eventBus, priority);
var defaultFillColor = config.renderer && config.renderer.defaultFillColor, var defaultFillColor = config && config.defaultFillColor,
defaultStrokeColor = config.renderer && config.renderer.defaultStrokeColor; defaultStrokeColor = config && config.defaultStrokeColor;
var rendererId = RENDERER_IDS.next(); var rendererId = RENDERER_IDS.next();
@ -1842,7 +1842,7 @@ export default function BpmnRenderer(
inherits(BpmnRenderer, BaseRenderer); inherits(BpmnRenderer, BaseRenderer);
BpmnRenderer.$inject = [ BpmnRenderer.$inject = [
'config', 'config.bpmnRenderer',
'eventBus', 'eventBus',
'styles', 'styles',
'pathMap', 'pathMap',

View File

@ -319,7 +319,7 @@ describe('draw - bpmn renderer', function() {
}; };
beforeEach(bootstrapViewer(xml,{ beforeEach(bootstrapViewer(xml,{
renderer: { bpmnRenderer: {
defaultFillColor: defaultFillColor, defaultFillColor: defaultFillColor,
defaultStrokeColor: defaultStrokeColor defaultStrokeColor: defaultStrokeColor
} }