I was following the bpmn-js-examples/properties-panel-extension and when I got to the Create a Moddle Extension section I tried to extend the property to all bpmn elements using “bpmn:BaseElement”. Unfortunately, it still applies the property to only the StartEvent. Any thoughts on what I might be doing wrong?
1 Like
Hello and thanks for sharing that comprehensive setup.
It looks like you limit the control shown in the properties panel to elements of type bpmn:StartEvent
:
// NewProps.js
export default function (group, element, translate) {
// Only return an entry, if the currently selected
// element is a start event.
if (is(element, "bpmn:StartEvent")) {
group.entries.push(
entryFactory.textField(translate, {
id: "input",
description: "Apply a new property",
label: "Input",
modelProperty: "input"
})
);
}
}
If you want an editing control to show up for all elements, remove the element check or, even better, check for your extension moddle type:
...
if (is(element, "custom:MyExtensionModdleType")) {
...
}
1 Like