Skip to content

Commit

Permalink
declare board ids
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-web committed Jun 14, 2024
1 parent 60beb18 commit 49162fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/formulas_extension/JSXQuestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ var JSXQuestion = function(boardIDs, jsxGraphCode, allowInputEntry, decimalPreci

for (i = 0; i < that.BOARDIDS.length; i++) {
attr = attributes[i] || attributes[0]; // First attributes are default.
attr.id = attr.id ?? that.BOARDIDS[i] + '_board';
board = JXG.JSXGraph.initBoard(that.BOARDIDS[i], attr);
that.boards.push(board);
}
Expand Down Expand Up @@ -288,6 +289,7 @@ var JSXQuestion = function(boardIDs, jsxGraphCode, allowInputEntry, decimalPreci
JXG.JSXGraph.freeBoard(that.boards[index]);
}

attributes.id = attributes.id ?? that.BOARDIDS[index] + '_board';
that.boards[index] = JXG.JSXGraph.initBoard(that.BOARDIDS[index], attributes);
return that.boards[index];
};
Expand Down Expand Up @@ -473,4 +475,4 @@ if (!Element.prototype.closest) {
} while (el !== null && el.nodeType === 1);
return null;
};
}
}

0 comments on commit 49162fd

Please sign in to comment.