I would like to set the x and y coordinates of a Panel within a absolutely sized Diagram. I understand that Imust use an instance of the Point class to do this. However I am at a loss as to how to do this. Is it something like this:
var myPoint = $(go.Point, {x: 240, y:80})
$(go.Panel, "Horizontal",
{ width: 60, height: 60 , x: myPoint.x, y: myPoint.y}, // panel properties
// elements in the panel:
$(go.Shape, "Rectangle", { stroke: "lime" }),
$(go.TextBlock, "Some Text")
)
Or maybe I need to Bind the x and y properties to those of myPoint? Sorry for being such a neophyte, I appreciate your help.
No, you should just call Model.addNodeData within a transaction and make sure that the data object that you add has all of the properties that you want and that the node template has all of the data bindings that you want.