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 26: | Line 26: | ||
var infobox = document.getElementById('myinfobox'); | var infobox = document.getElementById('myinfobox'); | ||
JXG.Line.prototype.highlight = function(){ | JXG.Line.prototype.highlight = function(){ | ||
infobox.innerHTML = this. | infobox.innerHTML = this.board.mousePosAbs.toString(); | ||
infobox.style.left = this.board.mousePosAbs[0]+20; | infobox.style.left = this.board.mousePosAbs[0]+20; | ||
infobox.style.top = this.board.mousePosAbs[1]-20; | infobox.style.top = this.board.mousePosAbs[1]-20; | ||
Line 35: | Line 35: | ||
} | } | ||
c.highlight = function(){ | c.highlight = function(){ | ||
infobox.innerHTML = | infobox.innerHTML = this.board.mousePosAbs.toString(); | ||
infobox.style.left = this.board.mousePosAbs[0]+20; | infobox.style.left = this.board.mousePosAbs[0]+20; | ||
infobox.style.top = this.board.mousePosAbs[1]-20; | infobox.style.top = this.board.mousePosAbs[1]-20; |
Revision as of 16:41, 18 December 2009