fix(contextpad): different handling for deletion of shapes and connections

See bpmn-io/bpmn-js#121
This commit is contained in:
jdotzki 2014-12-23 14:24:34 +01:00
parent fd76cc98dd
commit 1dd19fdb0d
1 changed files with 6 additions and 1 deletions

View File

@ -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);
}
} }
} }
}); });