Adapt highlighting of objects: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 28: | Line 28: | ||
var infobox = document.getElementById('myinfobox'); | var infobox = document.getElementById('myinfobox'); | ||
JXG.Line.prototype.highlight = function(){ | JXG.Line.prototype.highlight = function(){ | ||
infobox.innerHTML = this.board. | infobox.innerHTML = this.board.mousePosRel.toString(); | ||
infobox.style.left = (this.board.mousePosRel[0]+20)+'px'; | infobox.style.left = (this.board.mousePosRel[0]+20)+'px'; | ||
infobox.style.top = (this.board.mousePosRel[1]-20)+'px'; | infobox.style.top = (this.board.mousePosRel[1]-20)+'px'; | ||
Line 37: | Line 37: | ||
} | } | ||
c.highlight = function(){ | c.highlight = function(){ | ||
infobox.innerHTML = this.board. | infobox.innerHTML = this.board.mousePosRel.toString(); | ||
infobox.style.left = (this.board. | infobox.style.left = (this.board.mousePosRel[0]+20)+'px'; | ||
infobox.style.top = (this.board. | infobox.style.top = (this.board.mousePosRel[1]-20)+'px'; | ||
infobox.style.display = 'block'; | infobox.style.display = 'block'; | ||
} | } |
Revision as of 16:44, 18 December 2009