Hello,
Is it possible to add onClick event (or any other events) on Node object?
For example, I want to run the following function when a user is clicking on a node:
const myFunction = () =>{
window.alert("yay");
}
and on the Node object I would like to set:
let nodes: NodeModel[] = [
{
id: "node1",
height: 250,
width: 180,
offsetX: 100,
offsetY: 200,
shape: {
type: 'Image',
source: `${milk_tank}`,
},
onClick: myFunction
},