Merge branch 'master' into develop
This commit is contained in:
commit
5bed0aeca5
|
@ -19,6 +19,10 @@ import {
|
|||
is
|
||||
} from '../../util/ModelUtil';
|
||||
|
||||
import {
|
||||
isAny
|
||||
} from './util/ModelingUtil';
|
||||
|
||||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
||||
|
||||
/**
|
||||
|
@ -230,10 +234,13 @@ export default function BpmnUpdater(
|
|||
|
||||
// on reconnectEnd -> default flow
|
||||
if ((businessObject.sourceRef && businessObject.sourceRef.default) &&
|
||||
!(is(newTarget, 'bpmn:Activity') ||
|
||||
is(newTarget, 'bpmn:EndEvent') ||
|
||||
is(newTarget, 'bpmn:Gateway') ||
|
||||
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
|
||||
!isAny(newTarget, [
|
||||
'bpmn:Activity',
|
||||
'bpmn:EndEvent',
|
||||
'bpmn:Gateway',
|
||||
'bpmn:IntermediateThrowEvent',
|
||||
'bpmn:IntermediateCatchEvent'
|
||||
])) {
|
||||
context.default = businessObject.sourceRef.default;
|
||||
businessObject.sourceRef.default = undefined;
|
||||
}
|
||||
|
@ -248,10 +255,13 @@ export default function BpmnUpdater(
|
|||
|
||||
// on reconnectEnd -> conditional flow
|
||||
if (oldTarget && (businessObject.conditionExpression) &&
|
||||
!(is(newTarget, 'bpmn:Activity') ||
|
||||
is(newTarget, 'bpmn:EndEvent') ||
|
||||
is(newTarget, 'bpmn:Gateway') ||
|
||||
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
|
||||
!isAny(newTarget, [
|
||||
'bpmn:Activity',
|
||||
'bpmn:EndEvent',
|
||||
'bpmn:Gateway',
|
||||
'bpmn:IntermediateThrowEvent',
|
||||
'bpmn:IntermediateCatchEvent'
|
||||
])) {
|
||||
context.conditionExpression = businessObject.conditionExpression;
|
||||
businessObject.conditionExpression = undefined;
|
||||
}
|
||||
|
|
|
@ -1459,7 +1459,8 @@ describe('features/popup-menu - replace menu provider', function() {
|
|||
[
|
||||
'bpmn:Activity',
|
||||
'bpmn:EndEvent',
|
||||
'bpmn:IntermediateThrowEvent'
|
||||
'bpmn:IntermediateThrowEvent',
|
||||
'bpmn:IntermediateCatchEvent'
|
||||
].forEach(function(type) {
|
||||
|
||||
it('should keep DefaultFlow when changing target to ' + type,
|
||||
|
@ -1817,7 +1818,8 @@ describe('features/popup-menu - replace menu provider', function() {
|
|||
[
|
||||
'bpmn:Activity',
|
||||
'bpmn:EndEvent',
|
||||
'bpmn:IntermediateThrowEvent'
|
||||
'bpmn:IntermediateThrowEvent',
|
||||
'bpmn:IntermediateCatchEvent'
|
||||
].forEach(function(type) {
|
||||
|
||||
it('should keep ConditionalFlow when changing target to ' + type,
|
||||
|
|
Loading…
Reference in New Issue