From e487d6d8114b20d051660066a6dafc297920a11f Mon Sep 17 00:00:00 2001 From: jdotzki Date: Fri, 29 Aug 2014 16:03:08 +0200 Subject: [PATCH] feat(context-pad): add delete button See #118 --- .../context-pad/ContextPadProvider.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/features/context-pad/ContextPadProvider.js b/lib/features/context-pad/ContextPadProvider.js index a70d0777..2fcb8eca 100644 --- a/lib/features/context-pad/ContextPadProvider.js +++ b/lib/features/context-pad/ContextPadProvider.js @@ -95,24 +95,19 @@ 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) { - console.log('action.delete', e); - } - } - }); - */ - return actions; }; -module.exports = ContextPadProvider; \ No newline at end of file +module.exports = ContextPadProvider;