fix(contextpad): different handling for deletion of shapes and connections
See bpmn-io/bpmn-js#121
This commit is contained in:
parent
fd76cc98dd
commit
1dd19fdb0d
|
@ -104,7 +104,12 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
group: 'edit',
|
group: 'edit',
|
||||||
className: 'icon-trash',
|
className: 'icon-trash',
|
||||||
action: function(e) {
|
action: function(e) {
|
||||||
modeling.removeShape(element);
|
|
||||||
|
if (element.waypoints) {
|
||||||
|
modeling.removeConnection(element);
|
||||||
|
} else {
|
||||||
|
modeling.removeShape(element);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue