diff --git a/lib/draw/BpmnRenderer.js b/lib/draw/BpmnRenderer.js index a454b2e3..62f45030 100644 --- a/lib/draw/BpmnRenderer.js +++ b/lib/draw/BpmnRenderer.js @@ -1755,6 +1755,11 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) { strokeWidth: 2 }); } + + + // extension API, use at your own risk + this._drawPath = drawPath; + } diff --git a/test/spec/draw/BpmnRendererSpec.js b/test/spec/draw/BpmnRendererSpec.js index 71fe5410..1e166175 100644 --- a/test/spec/draw/BpmnRendererSpec.js +++ b/test/spec/draw/BpmnRendererSpec.js @@ -222,7 +222,7 @@ describe('draw - bpmn renderer', function() { it('should add random ID suffix to marker ID', function(done) { - + var xml = require('../../fixtures/bpmn/simple.bpmn'); bootstrapViewer(xml)(function(err) { @@ -331,4 +331,26 @@ describe('draw - bpmn renderer', function() { }); + + describe('extension API', function() { + + var diagramXML = require('../../fixtures/bpmn/simple.bpmn'); + + beforeEach(bootstrapModeler(diagramXML, { + modules: [ + coreModule, + rendererModule + ] + })); + + + it('should expose helpers', inject(function(bpmnRenderer) { + + // then + expect(bpmnRenderer._drawPath).to.be.a('function'); + + })); + + }); + });