diff --git a/lib/draw/BpmnRenderer.js b/lib/draw/BpmnRenderer.js index b7167d41..76d33d8a 100644 --- a/lib/draw/BpmnRenderer.js +++ b/lib/draw/BpmnRenderer.js @@ -299,10 +299,12 @@ function BpmnRenderer(events, styles, bpmnRegistry) { ' 0 0 9.8363 9.8036 0'; var dataObject = drawPath(p, DATA_OBJECT_PATH); - if(getObjectRef(data.id, 'isCollection') === true) { + if(getObjectRef(data.id, 'isCollection') === true || + bpmnRegistry.getSemantic(data.id).isCollection === true) { + var COLLECTION_PATH = 'M 0 0 l 0 15 l 1 0 l 0 -15 z' + - 'M 6 0 l 0 15 l 1 0 l 0 -15 z' + - 'M 12 0 l 0 15 l 1 0 l 0 -15 z'; + 'M 6 0 l 0 15 l 1 0 l 0 -15 z' + + 'M 12 0 l 0 15 l 1 0 l 0 -15 z'; var collectionIcon = drawPath(p, COLLECTION_PATH); collectionIcon.transform('translate(17.8,42.0)'); } @@ -401,7 +403,6 @@ function BpmnRenderer(events, styles, bpmnRegistry) { return semantic.dataObjectRef[refName]; } - // hook onto canvas init event to initialize // connection start/end markers on paper events.on('canvas.init', function(event) { diff --git a/test/fixtures/bpmn/render/data-objects.bpmn b/test/fixtures/bpmn/render/data-objects.bpmn index 973e5646..3033b53d 100644 --- a/test/fixtures/bpmn/render/data-objects.bpmn +++ b/test/fixtures/bpmn/render/data-objects.bpmn @@ -1,126 +1,249 @@ - - - - - - - - - - - - - - - - - DataObjectReference_1 - - - _DataStoreReference_2 - - - DataOutput_1 - - - DataObjectReference_1 - - - - - - - - - - - - _DataStoreReference_2 - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataInput_1 + sid-ADF95ACC-DEA6-4F6F-AF91-8F5BABB299AF + + + DataOutput_1 + sid-16646BD1-38D3-499A-95A6-42A75D8D2510 + + + + + + + + + + + + + + + + + + + + + + + + + sid-b4a08214-9dd4-40ad-8f82-4620ee384231 + sid-6c061a84-a3f2-4b69-93a5-8a3cafa27437 + + + sid-b4a589fa-6809-485d-ac79-9906084551f5 + sid-d5968987-50e5-4e42-9a3e-e8e3f6cc53bc + sid-bff296e6-46b4-4c63-9def-f68cdf80510d + + + + + + + DataObjectReference_1 + sid-b4a08214-9dd4-40ad-8f82-4620ee384231 + + + + + + Task_1 + _DataStoreReference_2 + + + + + + sid-b4a589fa-6809-485d-ac79-9906084551f5 + DataOutput_1 + + + + + + sid-d5968987-50e5-4e42-9a3e-e8e3f6cc53bc + DataObjectReference_1 + + + + + + + + + + + + + + + + + + + + + + _DataStoreReference_2 + Task_2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - - - + + - - - + + + + + + + + + + - - - - - - - - - + + + - - - + + + - - - - + + + - - - - + + + + + + + - \ No newline at end of file +