Hello i’m trying to deactivate direct Editing when a shape is added, in my case is a task. I already use the event shape.added but i failed in disable the edit.
This behavior is implemented in LabelEditingProvider. You can either override this component or intercept the event:
// make sure this is called after LabelEditingProvider
eventBus.on('create.end', 250, () => {
directEditing.cancel();
}
Hi, I’m sorry for replying only now, I tried that but did not work for me.
the event create.end active when i add a new shape using the ‘box’ (look the print)
and still with this my js broke.
but when i add a new shape(task) using other shape like this:
the event create.end dont active.
Thank you for the attention.
EDIT: I wrote this in the console bpmnModeler.get(‘directEditing’).cancel(); and worked but i sitll dont know which event i should use and when.
eventBus.on([
'create.end',
'autoPlace.end'
], 250, function() {
directEditing.cancel();
});
This should work. When creating elements through clicking the context pad autoPlace.end
is the event to listen for.
Yes exactly what i need, thank you.
btw do you know if there’s any documentation of bpmn.io or only examples?
We have a basic overview of how the toolkit works: https://bpmn.io/toolkit/bpmn-js/walkthrough/ Other than that unfortunately there’s no documentation, yet.