File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,13 +342,27 @@ public void focusLost() {
342342 super .focusLost ();
343343 this .renjinEngine .put ("focused" ,super .focused );
344344 }
345+
346+ @ Override
347+ public void mouseMoved () {
348+ wrapMouseVariables ();
349+ }
350+
351+ private void wrapMouseVariables () {
352+ this .renjinEngine .put ("mouseX" , mouseX );
353+ this .renjinEngine .put ("mouseY" , mouseY );
354+ this .renjinEngine .put ("pmouseX" , pmouseX );
355+ this .renjinEngine .put ("pmouseY" , pmouseY );
356+ //this.renjinEngine.put("mouseButton", mouseButton);
357+ }
345358
346359 /**
347360 * Set Environment variables in R top context.
348361 */
349362 protected void wrapProcessingVariables () {
350363 log ("Wrap Processing built-in variables into R top context." );
351364 // TODO: Find some ways to push constants into R.
365+ wrapMouseVariables ();
352366 this .renjinEngine .put ("width" , width );
353367 this .renjinEngine .put ("height" , height );
354368 this .renjinEngine .put ("displayWidth" , displayWidth );
You can’t perform that action at this time.
0 commit comments