@walter I have another question
I am trying to add a new shape to my nodes using
$scope.addStarTarget = function () {
$scope.myDiagram.add(
$(go.Part,
$(go.Shape,"Circle", {alignment: new go.Spot(1,0,5,-5),desiredSize: new go.Size(10, 10)}) // Top Left
)
)
};
It is not adding the circular star target
But if I try to add this inside Node then it works fine
$scope.myDiagram.nodeTemplate =
$(go.Node, "Spot",
{
//stretch: go.GraphObject.Horizontal,
locationSpot: go.Spot.TopLeft,
resizable: true,
name: 'shape',
locationObjectName: 'shape',
resizeObjectName: 'shape', // user can resize the Shape
selectionAdorned: false, // no selection handle when selected
},
new go.Binding("text", "text"), // for sorting
//Crop marks at each particular location
$(go.Shape, {alignment: go.Spot.TopLeft, geometry: CutMarkGeometry}),
$(go.Shape, {alignment: go.Spot.TopRight, geometry: CutMarkGeometry}),
$(go.Shape, {alignment: go.Spot.BottomRight, geometry: CutMarkGeometry}),
$(go.Shape, {alignment: go.Spot.BottomLeft, geometry: CutMarkGeometry}),
$(go.Shape,"Circle", {alignment: new go.Spot(1,1,5,5),desiredSize: new go.Size(10, 10)}), // Bottom Right
$(go.Shape,"Circle", {alignment: new go.Spot(1,0,5,-5),desiredSize: new go.Size(10, 10)}), //Top Right
$(go.Shape,"Circle", {alignment: new go.Spot(0,1,-5,5),desiredSize: new go.Size(10, 10)}), // Bottom Left
$(go.Shape,"Circle", {alignment: new go.Spot(0,0,-5,-5),desiredSize: new go.Size(10, 10)}), // Top Left
Inside Node :
Inside Node is working fine
But when I try using part it is not working