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,9 +104,14 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
group: 'edit',
|
group: 'edit',
|
||||||
className: 'icon-trash',
|
className: 'icon-trash',
|
||||||
action: function(e) {
|
action: function(e) {
|
||||||
|
|
||||||
|
if (element.waypoints) {
|
||||||
|
modeling.removeConnection(element);
|
||||||
|
} else {
|
||||||
modeling.removeShape(element);
|
modeling.removeShape(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return actions;
|
return actions;
|
||||||
|
|
Loading…
Reference in New Issue