Skip to content

Commit

Permalink
fix: support rendering of gateway without marker
Browse files Browse the repository at this point in the history
  • Loading branch information
sombrek authored and barmac committed Feb 15, 2024
1 parent 88b201a commit b100cdf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions lib/features/modeling/ElementFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@ ElementFactory.prototype.createElement = function(elementType, attrs) {
}

if (is(businessObject, 'bpmn:ExclusiveGateway')) {
if (has(attrs, 'isMarkerVisible')) {
if (attrs.isMarkerVisible === undefined) {
if (has(di, 'isMarkerVisible')) {
if (di.isMarkerVisible === undefined) {
di.isMarkerVisible = false;
} else {
attrs = applyAttribute(di, attrs, 'isMarkerVisible');
}
} else {
di.isMarkerVisible = true;
Expand Down
3 changes: 1 addition & 2 deletions lib/features/palette/PaletteProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ PaletteProvider.prototype.getPaletteEntries = function() {
),
'create.exclusive-gateway': createAction(
'bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none',
translate('Create gateway'),
{ isMarkerVisible: true }
translate('Create gateway')
),
'create.task': createAction(
'bpmn:Task', 'activity', 'bpmn-icon-task',
Expand Down
4 changes: 2 additions & 2 deletions test/spec/features/modeling/ElementFactorySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ describe('features - element factory', function() {
// when
var shape = elementFactory.createShape({
type: 'bpmn:ExclusiveGateway',
isMarkerVisible: true
di: { isMarkerVisible: true }
});

// then
Expand All @@ -225,7 +225,7 @@ describe('features - element factory', function() {
// when
var shape = elementFactory.createShape({
type: 'bpmn:ExclusiveGateway',
isMarkerVisible: false
di: { isMarkerVisible: false }
});

// then
Expand Down

0 comments on commit b100cdf

Please sign in to comment.