From 89a3a6bcd8f7bf72a67914a5c333cdbde56c7d60 Mon Sep 17 00:00:00 2001 From: jdotzki Date: Thu, 5 Mar 2015 14:18:53 +0100 Subject: [PATCH] feature(modeling): set di.isMarkerVisible for exclusive gateway as default close #221 --- lib/draw/BpmnRenderer.js | 3 ++- lib/features/modeling/ElementFactory.js | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/draw/BpmnRenderer.js b/lib/draw/BpmnRenderer.js index e469691f..43bc90ed 100644 --- a/lib/draw/BpmnRenderer.js +++ b/lib/draw/BpmnRenderer.js @@ -908,7 +908,8 @@ function BpmnRenderer(events, styles, pathMap) { 'bpmn:InclusiveGateway': function(p, element) { var diamond = drawDiamond(p, element.width, element.height); - /* circle path */ drawCircle(p, element.width, element.height, element.height * 0.24, { + /* circle path */ + drawCircle(p, element.width, element.height, element.height * 0.24, { strokeWidth: 2.5, fill: 'none' }); diff --git a/lib/features/modeling/ElementFactory.js b/lib/features/modeling/ElementFactory.js index fa3049b9..4cfa26eb 100644 --- a/lib/features/modeling/ElementFactory.js +++ b/lib/features/modeling/ElementFactory.js @@ -61,14 +61,18 @@ ElementFactory.prototype.create = function(elementType, attrs) { businessObject.di.isExpanded = attrs.isExpanded; } + if (businessObject.$instanceOf('bpmn:ExclusiveGateway')) { + businessObject.di.isMarkerVisible = true; + } + size = this._getDefaultSize(businessObject); - attrs = assign({ - businessObject: businessObject, - id: businessObject.id - }, size, attrs); + attrs = assign({ + businessObject: businessObject, + id: businessObject.id + }, size, attrs); - return this.baseCreate(elementType, attrs); + return this.baseCreate(elementType, attrs); };