I am Trying to implement above based on my Requirement , here is what i had
var = go.GraphObject.make;
myDiagram =
(go.Diagram, “myDiagramDiv”, // must name or refer to the DIV HTML element
{
initialContentAlignment: go.Spot.Center,
allowDrop: true, // must be true to accept drops from the Palette
“animationManager.duration”: 800, // slightly longer than default (600ms) animation
“undoManager.isEnabled”: true // enable undo & redo
});
myDiagram.nodeTemplateMap.add("LConnectorTopRight"),
$(go.Node, "Spot",
{
layerName: "Foreground",
selectionAdorned: false,
resizeObjectName: "Container",
//resizeAdornmentTemplate: $(go.Adornment, { locationSpot: go.Spot.Center, background: "transparent" }),
// rotateAdornmentTemplate: $(go.Adornment, { locationSpot: go.Spot.Center, background: "transparent" }),
// contextMenu: $(go.Adornment, { locationSpot: go.Spot.Center, background: "transparent" })
},
new go.Binding("location", "location", go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding("resizable"),
new go.Binding("rotatable"),
new go.Binding("angle").makeTwoWay(),
$(go.Panel, "Auto",
{
name: "Container",
minSize: new go.Size(7, 7),
toolTip: $(go.Adornment,
{ background: "lightyellow" },
$(go.TextBlock, new go.Binding("text"))
)
},
new go.Binding("width").makeTwoWay(),
new go.Binding("height").makeTwoWay(),
$(go.Shape,
{
strokeWidth: 6,
strokeMiterLimit: 1,
geometryString: "F1 M 112.000,3.000 L 3.000,3.000 L 3.000,57.000 L 58.000,57.000 L 58.000,111.000 L 112.000,111.000 L 112.000,3.000 Z"
},
new go.Binding("fill", "color")
),
$(go.Shape,
{
stretch: go.GraphObject.Fill,
fill: "transparent",
strokeWidth: 0,
margin: 13,
cursor: "move"
}),
$(go.Shape, "Rectangle",
{
fill: "transparent",
width: 7,
height: 7,
cursor: "hand",
//relinkableFrom: true,
//relinkableTo: true,
alignment: go.Spot.Center,
name: "R",
portId: "R",
spot1: new go.Spot(0.25, 0),
fromSpot: go.Spot.MiddleLeft, // coming out from middle-right
toSpot: go.Spot.MiddleLeft
}, new go.Binding("strokeWidth"),
new go.Binding("stroke", "isSelected", function (s) { return s ? "dodgerblue" : "gray"; }).ofObject()
),
$(go.Shape, "Rectangle",
{
fill: "transparent",
width: 7,
height: 7,
cursor: "hand",
// relinkableFrom: true,
// relinkableTo: true,
alignment: go.Spot.Center,
name: "B",
portId: "B",
spot1: new go.Spot(0.75, 1),
fromSpot: go.Spot.MiddleBottom, // coming out from middle-right
toSpot: go.Spot.MiddleBottom
}, new go.Binding("strokeWidth"),
new go.Binding("stroke", "isSelected", function (s) { return s ? "dodgerblue" : "gray"; }).ofObject()
)
)
);
// temporary links used by LinkingTool and RelinkingTool are also orthogonal:
myDiagram.toolManager.linkingTool.temporaryLink.routing = go.Link.Orthogonal;
myDiagram.toolManager.relinkingTool.temporaryLink.routing = go.Link.Orthogonal;
// myDiagram.model = myModel;
myPalette =
$(go.Palette, “myPaletteDiv”, // must name or refer to the DIV HTML element
{
“animationManager.duration”: 800, // slightly longer than default (600ms) animation
nodeTemplateMap: myDiagram.nodeTemplateMap, // share the templates used by myDiagram
model: new go.GraphLinksModel([ // specify the contents of the Palette
{ category: “LConnectorTopRight”, text: “LConnectorTopRight” }
])
});
and when i Run application it shows white empty screen
and when i debug using firebug it says b is defined i did understand what is this
here is attached screenshots