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 24, 2024
1 parent 2556dec commit 2bb06d4
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 2bb06d4

Please sign in to comment.