mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-26 04:32:44 +08:00

committed by
Nico Rehwaldt

parent
2a989465fb
commit
6da1a0cb63
@ -57,9 +57,6 @@ function ReplaceElementBehaviour(eventBus, bpmnReplace, bpmnRules, elementRegist
|
||||
attachers = oldShape.attachers,
|
||||
canReplace;
|
||||
|
||||
modeling.unclaimId(oldShape.businessObject.id, oldShape.businessObject);
|
||||
modeling.claimId(newShape.businessObject.id, newShape.businessObject);
|
||||
|
||||
if (attachers && attachers.length) {
|
||||
canReplace = bpmnRules.canReplace(attachers, newShape);
|
||||
|
||||
@ -67,6 +64,15 @@ function ReplaceElementBehaviour(eventBus, bpmnReplace, bpmnRules, elementRegist
|
||||
}
|
||||
|
||||
}, this);
|
||||
|
||||
this.postExecuted( [ 'shape.replace' ], 1500, function(e) {
|
||||
var context = e.context,
|
||||
oldShape = context.oldShape,
|
||||
newShape = context.newShape;
|
||||
|
||||
modeling.unclaimId(oldShape.businessObject.id, oldShape.businessObject);
|
||||
modeling.updateProperties(newShape, { id: oldShape.id });
|
||||
});
|
||||
}
|
||||
|
||||
inherits(ReplaceElementBehaviour, CommandInterceptor);
|
||||
|
Reference in New Issue
Block a user