fix(modeling): collapsed subprocess dont shows itself on the replace-menu
Solved with #247 Closes #509
This commit is contained in:
parent
07a1ef29b6
commit
489a6af3b2
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var getBusinessObject = require('../../../util/ModelUtil').getBusinessObject;
|
||||
var isExpanded = require('../../../util/DiUtil').isExpanded;
|
||||
|
||||
/**
|
||||
* Returns true, if an element is from a different type
|
||||
|
@ -19,11 +20,19 @@ function isDifferentType(element) {
|
|||
var businessObject = getBusinessObject(element),
|
||||
eventDefinition = businessObject.eventDefinitions && businessObject.eventDefinitions[0];
|
||||
|
||||
var isEventDefinitionEqual = (eventDefinition && eventDefinition.$type) === target.eventDefinitionType,
|
||||
isTypeEqual = businessObject.$type === target.type,
|
||||
isTriggeredByEventEqual = businessObject.triggeredByEvent == target.triggeredByEvent;
|
||||
var isTypeEqual = businessObject.$type === target.type;
|
||||
|
||||
return !isTypeEqual || !isEventDefinitionEqual || !isTriggeredByEventEqual;
|
||||
var isEventDefinitionEqual =
|
||||
(eventDefinition && eventDefinition.$type) === target.eventDefinitionType;
|
||||
|
||||
var isTriggeredByEventEqual =
|
||||
target.triggeredByEvent === undefined ||
|
||||
businessObject.triggeredByEvent === target.triggeredByEvent;
|
||||
|
||||
var isExpandedEqual =
|
||||
target.isExpanded === undefined || target.isExpanded === isExpanded(businessObject);
|
||||
|
||||
return !isTypeEqual || !isEventDefinitionEqual || !isTriggeredByEventEqual || !isExpandedEqual;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue