Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Context menu to change node color

$
0
0

@rendezvous wrote:

I’m trying to modify the basic sample diagram to be able to change the node color using the context menu. However, I’m having trouble combining both examples online. The problem with the context menu sample is that I can’t add new nodes and when I combine it with the basic sample, instead of appearing the text inside the node, the key value appears (integer number).
Is there a right way of changing the context menu in the basic sample diagram?? I see there are different buttons and I wonder what is the way of creating one that enables to change the node color, just like the following ones:
makeButton(“Cut”,
function(e, obj) { e.diagram.commandHandler.cutSelection(); },
function(o) { return o.diagram.commandHandler.canCutSelection(); }),
makeButton(“Copy”,
function(e, obj) { e.diagram.commandHandler.copySelection(); },
function(o) { return o.diagram.commandHandler.canCopySelection(); }),

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles