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
|
strokeWidth: 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// extension API, use at your own risk
|
||||||
|
this._drawPath = drawPath;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ describe('draw - bpmn renderer', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should add random ID suffix to marker ID', function(done) {
|
it('should add random ID suffix to marker ID', function(done) {
|
||||||
|
|
||||||
var xml = require('../../fixtures/bpmn/simple.bpmn');
|
var xml = require('../../fixtures/bpmn/simple.bpmn');
|
||||||
bootstrapViewer(xml)(function(err) {
|
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');
|
||||||
|
|
||||||
|
}));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue