chore(draw/BpmnRenderer): exposed _drawPath helper
This allows extensions to reuse the internal drawPath utility. Cf. #722 for context.
This commit is contained in:
parent
abddbb0889
commit
0cb46183eb
|
@ -1755,6 +1755,11 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) {
|
|||
strokeWidth: 2
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// extension API, use at your own risk
|
||||
this._drawPath = drawPath;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue