Difference between revisions of "Adding events"

From JSXGraph Wiki
Jump to: navigation, search
Line 13: Line 13:
 
             myPoint);
 
             myPoint);
 
myPoint.hasPoint = function(){return false; };
 
myPoint.hasPoint = function(){return false; };
 +
 +
var myPoint2 = brd.create('point',[-1,1], {size:5});
 +
 +
JXG.addEvent(myPoint2.rendNode, 'mouseover',
 +
            function(){ document.getElementById('myOutput').innerHTML = "Point "+this.name;},
 +
            myPoint2);
 +
JXG.addEvent(myPoint2.rendNode, 'mouseout',
 +
            function(){document.getElementById('myOutput').innerHTML = ' ';},
 +
            myPoint2);
 +
myPoint2.hasPoint = function(){return false; };
 +
  
 
</jsxgraph>
 
</jsxgraph>
  
 
[[Category:Examples]]
 
[[Category:Examples]]

Revision as of 12:25, 28 July 2010