Adapt highlighting of objects: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 28: Line 28:
JXG.Line.prototype.highlight = function(){
JXG.Line.prototype.highlight = function(){
     infobox.innerHTML = this.name;
     infobox.innerHTML = this.name;
     infobox.style.left = this.board.mousePosAbs[0]+20;
     infobox.style.left = (this.board.mousePosAbs[0]+20)+'px';
     infobox.style.top = this.board.mousePosAbs[1]-20;
     infobox.style.top = (this.board.mousePosAbs[1]-20)+'px';
     infobox.style.display = 'block';
     infobox.style.display = 'block';
}
}
Line 37: Line 37:
c.highlight = function(){
c.highlight = function(){
     infobox.innerHTML = 'circle '+this.name;
     infobox.innerHTML = 'circle '+this.name;
     infobox.style.left = this.board.mousePosAbs[0]+20;
     infobox.style.left = (this.board.mousePosAbs[0]+20)+'px';
     infobox.style.top = this.board.mousePosAbs[1]-20;
     infobox.style.top = (this.board.mousePosAbs[1]-20)+'px';
     infobox.style.display = 'block';
     infobox.style.display = 'block';
}
}

Revision as of 16:20, 18 December 2009

The JavaScript code