Hi,
i created an interaktive graph. Now i need to add points (or more general: geometric shapes) to the graphbox.
This should be done on a mousklick using MouseTrap().
I thought of soemthing like that:
// Ad a marker to the graph at the position where the mouse was pressed
::click = function({x,y},
::g << Marker(MarkerState(3), x, y);
::g << Circle(x, y, PixelRadius(10));
);
::w = New Window("Test",
// Some other components (Textboxes...)
::g = Graph Box(
FrameSize( 300, 300 ),
Mousetrap( ::click( x, y ), {} )
)
);
But sadly this does not work. Is there a way to do something like that?
Thanks for any hints!