Hi,
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.
Thanks!
Hi,
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.
Thanks!
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?
To remove these menus you could:
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
).
Create ContextPadProvider
/PaletteProvider
that removes the palette/context pad entries which trigger the menus. Example:
this._palette.registerProvider(500,this);
CustomProvider.prototype.getPaletteEntries = function(element) {
return function(entries) {
delete entries.create; // entries.append for menu in contextPad
return entries;
};
};
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.