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

Can you set model data property to the key of the created node?

$
0
0

@GSA wrote:

For example, I have this nodedataarray for my palette:

palette.model.nodeDataArray = [
    { category: EquipmentNodeType.CAMERA, id: "0", nodeType: EquipmentNodeType.CAMERA, text: "Kamera" },
    { category: EquipmentNodeType.SIGN, id: "0", nodeType: EquipmentNodeType.SIGN, text: "Skilt" }
];

Is it possible for me to make the id get set to the key by default instead of "0" (essentially, can I grab the node that is being created here so I can access node.data.key)? I need the ID to get an initial unique value (will be mapped and overwritten later in the backend system).

Posts: 9

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles