Hi,
On double-click of a node, I want to launch a properties window in a light box. Please could you give me some direction on how to achieve this.
Thanks In Advance,
Ian.
Hi,
On double-click of a node, I want to launch a properties window in a light box. Please could you give me some direction on how to achieve this.
Thanks In Advance,
Ian.
To get the double-click event, set the GraphObject.doubleClick property on your Node (template) to a function. There are several examples in the samples, such as Class Hierarchy Diagram Showing All GoJS Classes | GoJS Diagramming Library and Interactive Organizational Chart Diagram Editor | GoJS Diagramming Library
myDiagram.nodeTemplate =
$(go.Node, . . .,
{
doubleClick: function(e, node) {
// . . . now node is the Node that was double-clicked
var data = node.data;
// now data has all of the custom app-specific properties that you have
// supplied for that node, in the Model.nodeDataArray
. . .
}
},
. . .);
In the doubleClick event handler you can use obj.data to get the model data for the node. Then you can use whatever your framework supports, or just plain HTML, to show the properties you want.