Position of InfoBox

170 views
Skip to first unread message

Tim Kröger

unread,
Sep 12, 2012, 3:57:30 AM9/12/12
to jsxg...@googlegroups.com, tim.k...@ohm-hochschule.de
Dear JSXGraph Team,

Is there any possibility to influence the position of the InfoBox that is displayed with any point (unless disabled), showing the coordinates of the point?  That is, in particular, if the point happens to be near the top of the board, the InfoBox cannot be seen at all, because it is displayed outside the board.  I would like to change this.

Thank you in advance for your help.

Tim Kröger

michael

unread,
Sep 12, 2012, 8:06:21 AM9/12/12
to jsxg...@googlegroups.com, tim.k...@ohm-hochschule.de
You can set the infobox' distanceX and distanceY properties:

board = JXG.JSXGraph.initBoard('jxgbox', ...);
   
board.infobox.distanceX = 100;
board.infobox.distanceY = 100;

board.create('point', [0, 0]);



Michael

Tim Kröger

unread,
Sep 12, 2012, 8:16:42 AM9/12/12
to jsxg...@googlegroups.com, tim.k...@ohm-hochschule.de
Thank you very much, this solves the problem!

Tim

Florian Leupold

unread,
Jan 10, 2023, 3:29:14 PM1/10/23
to JSXGraph
Why is it not possible to change the position via a global option like:

JXG.Options.infobox.distanceX = 100;

By contrast, setting the strokeColor this way does work:

JXG.Options.infobox.strokeColor = '000';

Alfred Wassermann

unread,
Jan 11, 2023, 8:41:42 AM1/11/23
to JSXGraph
Very good suggestion. This feature was overdue. In the next version there will be the infobox attributes

JXG.Options.infobox.distanceX and JXG.Options.infobox.distanceY

This change is already contained in the source code.

Thanks a lot, Alfred



Reply all
Reply to author
Forward
0 new messages