From 7e5f4eba142476e4596cc61a15d0964dc043c510 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 4 Sep 2014 13:28:35 +0200 Subject: [PATCH] fix(context-pad): make all bpmn elements deletable Related to #118 --- lib/features/context-pad/ContextPadProvider.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/features/context-pad/ContextPadProvider.js b/lib/features/context-pad/ContextPadProvider.js index 2fcb8eca..85bbd4e7 100644 --- a/lib/features/context-pad/ContextPadProvider.js +++ b/lib/features/context-pad/ContextPadProvider.js @@ -52,7 +52,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { var target; - if(type === 'bpmn:TextAnnotation') { + if (type === 'bpmn:TextAnnotation') { target = modeling.appendTextAnnotation(element, type); } else { target = modeling.appendFlowNode(element, type); @@ -95,17 +95,20 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { action: function() { append(element, 'bpmn:TextAnnotation'); } - }, - 'action.delete': { - imageUrl: 'data:image/png;base64,' + images.TRASH, - action: function(e) { - modeling.removeShape(element); - } } }); } + _.extend(actions, { + 'action.delete': { + imageUrl: 'data:image/png;base64,' + images.TRASH, + action: function(e) { + modeling.removeShape(element); + } + } + }); + return actions; };