mousetracker.stop

getMouseTracker(id).stop()

Stops tracking the mouse cursor coordinates.

Make sure to use this command to stop tracking and prevent your results file from growing too much.

Example:

[js highlight=”18″ try=”true”]newButton(“Start”)
.print(“center at 50vw”, “center at 50vh”)
.wait()
.remove()
,
newMouseTracker(“mouse”).log().start()
,
newCanvas(“left”, “40vw”, “40vh”)
.css(“background”,”red”)
.print(“center at 25vw”,”center at 50vh”)
,
newCanvas(“right”, “40vw”, “40vh”)
.css(“background”,”blue”)
.print(“center at 75vw”,”center at 50vh”)
,
newSelector(“choice”).add(getCanvas(“left”),getCanvas(“right”)).log().wait()
,
getMouseTracker(“mouse”).stop()[/js]

Will start tracking mouse movements after a click on Start and stop once one of the two Canvas elements is clicked.

Published by Jeremy

Researcher in semantics and pragmatics; Programmer of PennController for IBEX