From 1dd19fdb0d1b424a83e7cc839c188d00dbbb9608 Mon Sep 17 00:00:00 2001 From: jdotzki Date: Tue, 23 Dec 2014 14:24:34 +0100 Subject: [PATCH] fix(contextpad): different handling for deletion of shapes and connections See bpmn-io/bpmn-js#121 --- lib/features/context-pad/ContextPadProvider.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/features/context-pad/ContextPadProvider.js b/lib/features/context-pad/ContextPadProvider.js index ee4fb430..82b7ceda 100644 --- a/lib/features/context-pad/ContextPadProvider.js +++ b/lib/features/context-pad/ContextPadProvider.js @@ -104,7 +104,12 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { group: 'edit', className: 'icon-trash', action: function(e) { - modeling.removeShape(element); + + if (element.waypoints) { + modeling.removeConnection(element); + } else { + modeling.removeShape(element); + } } } });