How do I get the x and y coordinate in javascript in PlotPanel
John Val
13 Posts
Dear all,
I would like to start a simulation from a point under a mouseclick in the plotpanel in the javascript version. In the plotting panel of the FunctionPlotter example I enabled interaction and put %mouseClick% at the Onpress event.
In this functioen I would like to read the x and y postion under the cursor. I know I must be able to get them somewhere since in the lower left corner a box with these values appears.
function mouseClick() { var x= _view.plottingPanel.pointer.x; // this does not work. But what does? alert(x); }