【发布时间】:2017-06-15 12:30:36
【问题描述】:
我的意思是左侧调色板和右侧图表区域的应用程序类型。
例如我有以下节点模板:
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");
}}
);
并且想要在节点级别添加 Guid 属性,当我们使用 toJson 函数保存图表时,该属性将出现在 Json 模型中。怎么做?
【问题讨论】: