Hi
Application use gojs version gojs-1.7.22 inside service now platform.
trying to load a JSON data into model. it is behaving very weird. when load a model from json all the groups are rendering but the nodes and links are not.
what will be the possible issue. is there any issue with version?
I am sharing some code snip.
var defaultMap = $(go.Node, "Spot",{
contextMenu : nodeMenu,
locationSpot: go.Spot.Center,
toolTip: tooltiptemplate,
doubleClick: function(evt, node) {
openNodeForEdit(node.data);
},
resizable: false,
/*portId: "", fromLinkable: true, toLinkable: true, cursor: "pointer",
fromSpot: go.Spot.AllSides , toSpot: go.Spot.AllSides,*/
mouseEnter: function (e, obj) { showPorts(obj.part, true); },
mouseLeave: function (e, obj) { showPorts(obj.part, false); }
},
$(go.Panel, "Spot",
//{ width: 60, height: 100 },
$(go.Shape, "RoundedRectangle",
{ margin: 1,fill: null }),
$(go.Panel, "Vertical",
$(go.Picture, {
alignment: go.Spot.Center,
width: 55, height: 70,
margin: 1
},
new go.Binding("source"),
new go.Binding("background","conceptual",nodeStyle)
),
$(go.Panel, "Spot",{
alignment: go.Spot.BottomRight , alignmentFocus: go.Spot.BottomRight
},
$(go.Shape, "Circle", {
width: 25, height: 25, fill: "pink"
}),
$(go.TextBlock,{
alignment: go.Spot.Center,
textAlign: "center", margin: 5, editable: false ,
alignmentFocus: go.Spot.Center
},
new go.Binding("text","country_code")),
new go.Binding("visible","country_code",function(code){ return (code != "");})
)
),
$(go.TextBlock,{
alignment: go.Spot.Bottom,
textAlign: "center", margin: 5, editable: false ,
alignmentFocus: go.Spot.BottomCenter,
wrap: go.TextBlock.WrapFit
},
new go.Binding("text","text").makeTwoWay())
),
makePort("T", go.Spot.Top, false, true),
makePort("L", go.Spot.Left, true, true),
makePort("R", go.Spot.Right, true, true),
makePort("B", go.Spot.Bottom, true, false)
);
flowTemplateMaps = new go.Map("string", go.Node);
flowTemplateMaps.add("",defaultMap); // Default Node Map
this is the JSON
{
"class": "go.GraphLinksModel",
"nodeDataArray": [
{
"description": "Data Subject",
"text": "Data Subject",
"key": "fcbe9bad1b2e6410cea7ea8bbc4bcb01",
"order": 100,
"isGroup": true,
"size": "300 700"
},
{
"source": "2d39f3121b522810cea7ea8bbc4bcb60.iix",
"text": "Data Subject",
"key": -1,
"group": "fcbe9bad1b2e6410cea7ea8bbc4bcb01"
}
]
}
mainFlowDiagram.model = go.Model.fromJson(dataJSON);
Thanks.