Skip to content

Commit

Permalink
Enlarge the provided bounding box by JXG.Math.eps in each direction so
Browse files Browse the repository at this point in the history
that points can be brought to the edge.
  • Loading branch information
drgrice1 committed Dec 12, 2024
1 parent 8dfd032 commit 493dd18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions htdocs/js/GraphTool/graphtool.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ window.graphTool = (containerId, options) => {
// Merge options that are set by the problem.
if (typeof options.JSXGraphOptions === 'object') JXG.merge(cfgOptions, options.JSXGraphOptions);

cfgOptions.boundingBox[0] = cfgOptions.boundingBox[0] - JXG.Math.eps;
cfgOptions.boundingBox[1] = cfgOptions.boundingBox[1] + JXG.Math.eps;
cfgOptions.boundingBox[2] = cfgOptions.boundingBox[2] + JXG.Math.eps;
cfgOptions.boundingBox[3] = cfgOptions.boundingBox[3] - JXG.Math.eps;

const setupBoard = () => {
gt.board = JXG.JSXGraph.initBoard(`${containerId}_graph`, cfgOptions);
gt.board.suspendUpdate();
Expand Down

0 comments on commit 493dd18

Please sign in to comment.