On touch devices the user can access a context menu. It fits all of our current needs but we do need to style it. Current default menu does not have any classes or anything that would allow easy styling. There doesn’t seem to be any way to add them either, other than creating a new context menu from scratch.
Are you asking if you can modify ContextMenuTool | GoJS API ? Yes, I think you can, but the initial value may change in unexpected ways in the future. Including that it might not exist until a touch event causes it to be created on demand.
Yes, that’s the one. What I’m asking, however, is can I add some css class to the default html wrapper so I can apply some styling to it? Then, whether or not it exists at any given time doesn’t matter.
It isn’t documented (so it might change in the future) and might not be usable by you in your circumstances, but the HTML created by ContextMenuTool.showDefaultContextMenu uses the classes “goCXul” for the <ul> element and “goCXli” for the <li> element and “goCXa” for the <a> element. Those CSS classes are defined when the default context menu is first created.
I see. Unfortunately that doesn’t help as I’d need to select the outermost elements. Please consider adding an option to give classes to them to the backlog, I imagine it’ll be a very minor change.