fix(context-pad): make all bpmn elements deletable

Related to #118
This commit is contained in:
Nico Rehwaldt 2014-09-04 13:28:35 +02:00
parent 85150135a6
commit 7e5f4eba14
1 changed files with 10 additions and 7 deletions

View File

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