Adding events: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (New page: <jsxgraph width="400" height="400"> var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4], keepaspectratio:true}); var point = brd.create('point',[1,1], {size:5}); </jsxgraph>) |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<html> | |||
<p id="myOutput"></p> | |||
</html> | |||
<jsxgraph width="400" height="400"> | <jsxgraph width="400" height="400"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4], keepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4], keepaspectratio:true}); | ||
var | var myPoint = brd.create('point',[1,1], {size:5}); | ||
JXG.addEvent(myPoint.rendNode, 'mouseover', | |||
function(){ document.getElementById('myOutput').innerHTML = "Point "+this.name;}, | |||
myPoint); | |||
JXG.addEvent(myPoint.rendNode, 'mouseout', | |||
function(){document.getElementById('myOutput').innerHTML =}, | |||
myPoint); | |||
point.hasPoint = function(){return false; }; | |||
</jsxgraph> | </jsxgraph> | ||
[[Category:Examples]] |
Revision as of 11:23, 28 July 2010