Skip to content

Commit

Permalink
Tweak the graphtool for this situation.
Browse files Browse the repository at this point in the history
Basically, if the feedback popover is opened with the reveal button in a
graphtool problem, and the reveal button is not clicked before the
popover closes, then the graphtool timeout that is waiting for the
graphtool container to be shown errors out because it calls the
graphtool initialization method and there is no longer a graph container
in the DOM.  So just return if the graph container is not found.
  • Loading branch information
drgrice1 committed Jan 23, 2024
1 parent db8a7c3 commit 1142858
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/js/GraphTool/graphtool.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ window.graphTool = (containerId, options) => {
const gt = {};

gt.graphContainer = document.getElementById(containerId);
if (!gt.graphContainer) return;
if (gt.graphContainer.offsetWidth === 0) {
setTimeout(() => window.graphTool(containerId, options), 100);
return;
Expand Down

0 comments on commit 1142858

Please sign in to comment.