@n0gare wrote:
Hello,
in orientation to this example i tried to use my own custon contextmenu.
I struggeled to get it going, so I almost copied the example. I only changed the names of the variables and methods a bit.
For some reason the contextMenu is not shown on my diagram.Since the code for the contextMenu is the same as in the example, there must be a different reason.
I am using GoJS in combination with Leaflet.
I was using jquery contexmenus in the past, but I want to try out this one.Take a look at the nodeTemplate that I am trying to use the contextMenu for,
I also tried using the contextMenu for the diagram ifself, so that a backgroundclick will trigger a contextMenu
basicGoJSNodeTemplate =
$(go.Node, "Table",
{
locationObjectName: "",
locationSpot: go.Spot.Center,
selectable: true,
selectionAdornmentTemplate: nodeSelectionAdornmentTemplate,
resizable: true,
resizeObjectName: "BODY",
resizeAdornmentTemplate: nodeResizeAdornmentTemplate,
rotatable: true,
rotateAdornmentTemplate: nodeRotateAdornmentTemplate,
contextMenu: contextMenuBasicNT
},
$(go.Panel, "Auto",
{
row: 1,
column: 1,
stretch: go.GraphObject.Fill,
},
$(go.Shape, "Circle", { // default figure
fill: "blue", // default color
strokeWidth: 3,
name: "BODY",
},My first suggestion was that the contextMenu is behind the diagram, so I already tried to adjust the z-index.
I placed the
contextMenu divoutside the diagramsdivI hope you have some suggestions for me!
Best regards!
Posts: 1
Participants: 1