Disable popupMenu for palette and contextpad

I was able to hide elements from and add elements to the palette and the contextpad. But how do I hide the …-popupMenu in both cases? I did not find anything regarding this in the examples.


What exactly do you want to achieve? Do you want to fully disable the “Create element”/“Append element” menus present in the palette and context pad?

Yes, we want to restrict the modeler to certain elements (that we add explicitly to the palette and the contextpad) and disable/hide the popupMenu with the advanced elements.

These menus are part of a the newest create-append-anything feature. As I see it, you can: (a) customize (remove or add) elements shown in create/append menus or (b) remove this feature completely - menus not available. Could you please confirm what your goal would be?

Our goal would be (b).

To remove these menus you could:

  1. Exclude the create-append-anything module: Do not use Modeler but rely on BaseModeler. Pick only the modules you actually need (excluding create-append-anything).

  2. Create ContextPadProvider/PaletteProvider that removes the palette/context pad entries which trigger the menus. Example:

CustomProvider.prototype.getPaletteEntries = function(element) {
  return function(entries) {

    delete entries.create; // entries.append for menu in contextPad

    return entries;
1 Like

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