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

How to add new property to node template that will be saved to Json diagram model?

$
0
0

@tesicg wrote:

I mean on type of application with palette on the left and diagram area on the right side.

For example I have the following node template:

var inputTemplate =
    $(go.Node, "Spot",
    nodeStyle(),
    $(go.Shape, "Circle", shapeStyle1(),
        { fill: red }),  // override the default fill (from shapeStyle1()) to be red
    $(go.Shape, "Rectangle", portStyle(false),  // the only port
        { portId: "", alignment: new go.Spot(1, 0.5) }),
    {
        doubleClick: function (e, obj) {
            window.open("http://www.microsoft.com", "_blank");
    }}
    );

And want to add Guid property on node level that will appear in Json model when we save the diagram using toJson function. How to do it?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6968

Trending Articles