Hi,
I want to add labels to custom elemens. I add code to LabelEditingProvider.js and LabelUtil.js, but the label can’t display. What steps are needed to implement this function?
function activateDirectEdit(element, force) {
if (force ||
isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation' ]) ||
isCollapsedSubProcess(element) || element.type === "custom:OM") {
directEditing.activate(element);
}
}
function getLabelAttr(semantic) {
if (is(semantic, 'bpmn:FlowElement') ||
is(semantic, 'bpmn:Participant') ||
is(semantic, 'bpmn:Lane') ||
is(semantic, 'bpmn:SequenceFlow') ||
is(semantic, 'bpmn:MessageFlow') || semantic.type === "custom:OM") {
return 'name';
}
if (is(semantic, 'bpmn:TextAnnotation')) {
return 'text';
}
}