Here is the code i have written it is adding a new custom shape in context but removing all previous shapes in context pad.
You can find an example of how to add new entries while keeping existing entries here: diagram-js/lib/features/context-pad/ContextPadProvider.ts at develop · bpmn-io/diagram-js · GitHub
Basically, you’d want to return a function instead of an object:
getPopupMenuEntries(element) {
return function(entries) {
// ...
};
}
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.