add example

This commit is contained in:
Martin Stamm 2021-10-25 18:31:33 +02:00
parent 3d18a209fa
commit 3095a69920
No known key found for this signature in database
GPG Key ID: B3A641060A8CBCF4
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import {
} from 'test/TestHelper';
import { getDi } from 'lib/util/ModelUtil';
import { assign } from 'min-dash';
var singleStart = window.__env__ && window.__env__.SINGLE_START === 'modeler';
@ -43,6 +44,19 @@ describe('Modeler', function() {
}
});
var eventBus = modeler.get('eventBus');
eventBus.on([ 'render.shape', 'render.connection' ], 5000, function(event, context) {
console.log(event, context);
context.attrs = assign({}, context.attrs, {
stroke: 'pink',
fill: '#eeeeee'
});
console.log(context);
});
setBpmnJS(modeler);
return modeler.importXML(xml).then(function(result) {