From e5e0bb9e3f77bec0d98b3c70ac8b83c40d725537 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Wed, 8 Apr 2026 17:09:52 -0500 Subject: [PATCH] Fix a minor bug in the GraphTool. This is a result of a workaround for a bug in the JSXGraph library and failure to properly convert all of the code in the `keyDownListener` function to work outside of the library. The `Const` object is not defined. To access those constants instead the `JXG` global object must be used. --- htdocs/js/GraphTool/graphtool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/js/GraphTool/graphtool.js b/htdocs/js/GraphTool/graphtool.js index 0991e15fe..1656f5a80 100644 --- a/htdocs/js/GraphTool/graphtool.js +++ b/htdocs/js/GraphTool/graphtool.js @@ -341,7 +341,7 @@ window.graphTool = (containerId, options) => { el.isDraggable && el.visPropCalc.visible && ((this.geonextCompatibilityMode && - (JXG.isPoint(el) || el.elementClass === Const.OBJECT_CLASS_TEXT)) || + (JXG.isPoint(el) || el.elementClass === JXG.OBJECT_CLASS_TEXT)) || !this.geonextCompatibilityMode) && !el.evalVisProp('fixed') ) { @@ -354,7 +354,7 @@ window.graphTool = (containerId, options) => { this.updateInfobox(el); } else { this.displayInfobox(false); - el.setPositionDirectly(Const.COORDS_BY_USER, dir, [0, 0]); + el.setPositionDirectly(JXG.COORDS_BY_USER, dir, [0, 0]); } this.triggerEventHandlers(['keymove', 'move'], [evt, this.mode]);