You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root of the problem is the erroneous re-use of the variable "maxLinksPreview". Its value is used as a limit in a given display cycle, rather than a global constant (like "maxNodesPreview"). Each time links are to be drawn, it is basically set to the mumber of links to be drawn and never reset to the true initial limit set at preview startup. As a result, any time the number of links to be drawn exceed the number of links drawn in the previous cycle, a factitious error is detected and the message displayed.
The problem is easily demonstrated:
open preview
select a project with some number of links (say, 5) and let it display
without closing preview, select a project with a larger number of links (say, 10) and let it display
the error message will be displayed because maxLinksPreview is set to 5 in the first instance and that number is mistakenly treated as an actual maximum in the second cycle. Since 10 exceeds 5, the error message is generated.
The fix is to use a different variable for the limit needed when a new project is selected.
Here is my solution, which has been thoroughly tested. The new variable introduced is 'maxLinksPreviewActual '.
WARNING: The solution presented is a modification of the latest code base to which I have access (August 2023). I have not been notified of a later version or been able to detect one -- if there is such, the error may have been fixed or the line numbers differ.
line# 256 - 261
<...>
// Draw Links
if (pfile["linkcount"] > maxLinksPreview) {
document.getElementById("warning").innerHTML = "TOO MANY LINKS FOR PREVIEW";
maxLinksPreviewActual = maxLinksPreview;
}
else{
maxLinksPreviewActual = pfile["linkcount"];
}
count = 0;
for (let l = 0; l < maxLinksPreviewActual; l++) {
<...>
line# 400 - 406
<...>
// Draw Links
if (pfile["linkcount"] > maxLinksPreview) {
document.getElementById("warning").innerHTML = "TOO MANY LINKS FOR PREVIEW";
maxLinksPreviewActual = maxLinksPreview;
}
else{
maxLinksPreviewActual = pfile["linkcount"];
}
count = 0;
for (let l = 0; l < maxLinksPreviewActual ; l++) { // this line incorporates fix to last link not displayed bug = ACC
<...>
The text was updated successfully, but these errors were encountered:
The root of the problem is the erroneous re-use of the variable "maxLinksPreview". Its value is used as a limit in a given display cycle, rather than a global constant (like "maxNodesPreview"). Each time links are to be drawn, it is basically set to the mumber of links to be drawn and never reset to the true initial limit set at preview startup. As a result, any time the number of links to be drawn exceed the number of links drawn in the previous cycle, a factitious error is detected and the message displayed.
The problem is easily demonstrated:
The fix is to use a different variable for the limit needed when a new project is selected.
Here is my solution, which has been thoroughly tested. The new variable introduced is 'maxLinksPreviewActual '.
WARNING: The solution presented is a modification of the latest code base to which I have access (August 2023). I have not been notified of a later version or been able to detect one -- if there is such, the error may have been fixed or the line numbers differ.
line# 256 - 261
<...>
// Draw Links
if (pfile["linkcount"] > maxLinksPreview) {
document.getElementById("warning").innerHTML = "TOO MANY LINKS
FOR PREVIEW";
maxLinksPreviewActual = maxLinksPreview;
}
else{
maxLinksPreviewActual = pfile["linkcount"];
}
count = 0;
for (let l = 0; l < maxLinksPreviewActual; l++) {
<...>
line# 400 - 406
<...>
// Draw Links
if (pfile["linkcount"] > maxLinksPreview) {
document.getElementById("warning").innerHTML = "TOO MANY LINKS
FOR PREVIEW";
maxLinksPreviewActual = maxLinksPreview;
}
else{
maxLinksPreviewActual = pfile["linkcount"];
}
count = 0;
for (let l = 0; l < maxLinksPreviewActual ; l++) { // this line incorporates fix to last link not displayed bug = ACC
<...>
The text was updated successfully, but these errors were encountered: