Modify suggested/related elements of an event in Bpmn.io


#1

Hi,

Can anybody help me out to modify(delete&add new) suggested group of icons which comes with event after dragged to the canvas, i just want to add a new icon also delete some icons from the group.

image

Thanks,
Siva


#2

Hi SIva,

If you want to just add the icons, you can register your own provider using ContextPad#registerProvider: https://github.com/bpmn-io/diagram-js/blob/master/lib/features/context-pad/ContextPad.js#

For further modification, you can subclass existing ContextPadProvider and reimplement ContextPadProvider#getContextPadEntries: https://github.com/bpmn-io/bpmn-js/blob/350a5ab75ed675991599faff9615e4bbe184d491/lib/features/context-pad/ContextPadProvider.js

Best,

Maciej


#3

Hi Maciej,

Thanks for the reply,
I have ContextPadProvider.js file, i’m using angular version of bpmn.io, whether i have to create a instance or i have to edit directly inside the file, i’m new to bpmn.io thats why!

thanks,
Siva


#4

What are you referring to as the Angular version of bpmn.io?


#5

Hi philipp,

I’m referring the angular project created by narve.

thanks,
Siva


#6

You’d have to override the current provider with your customized version of it.


#7

thanks for the help philipp, how can i make the text input lable disable once the value is set

thanks,
Siva


#8

Hi Siva,

please provide a code example so that we can help you.

Best,

Maciej


#9

Hi Maciej,

image

i want to make the name readonly, i’m binding the name using the following method through a seperate form,

var elementRegistry = this.modeler.get(‘elementRegistry’);
var element = elementRegistry.get(id);
var modeling = this.modeler.get(‘modeling’);
var name=“start event”;
modeling.updateProperties(element, {
name: name,
});

so i just want to disable or make it readonly in the canvas.

Thanks,
Siva


#10

You’d have to override LabelEditingProvider with your own implementation to achieve this.


#11

i will try, thanks for the idea