Open popup menu in the application with custom entries

How do you open a popup menu? Is it possible to do this anywhere in the canvas?

I saw this function in diagram-js:

PopupMenu.prototype.open = function(element, id, position){}

Could someone explain what these 3 arguments are?
Would it be possible to open a popup within a popup (like a submenu)?

In previous threads I have seen users mention to use a custom provider like the ReplaceMenuProvider.js file. Is there a more intuitive way to open popups?
Also came across this closed issue on the diagram-js github page:

Can anyone explain what the solution was?

The context pad is a good example of how to open a registered popup menu.

 popupMenu.open(element, 'bpmn-replace', position);

So, as you see, the options mean the following

  • element: the currently focussed element
  • id: the id of a registered popup menu, e.g. bpmn-replace
  • position: the x and y coordinates where the menu should appear

Would it be possible to open a popup within a popup (like a submenu)?

Can you maybe open another thread for this (to keep the discussion focused) and give some more details? How should your popup menu look like?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.