Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: web page crashes when link strength is too high #45

Open
nwlandry opened this issue Jun 17, 2019 · 1 comment
Open

bug: web page crashes when link strength is too high #45

nwlandry opened this issue Jun 17, 2019 · 1 comment
Labels

Comments

@nwlandry
Copy link

I am using Google Chrome on a Windows machine and on the webweb documentation page (https://webwebpage.github.io) if I set the link strength to 5 on any visualization, the website crashes. I think the input should be restricted, or better error handling implemented. I tested it out, and if the link strength is slightly higher than 1 (1.1, etc.) it still works.

@hneutr hneutr added the bug label Jun 17, 2019
@nwlandry
Copy link
Author

I think this would fix it (referencing line 1124 in the webweb.v5.js file) for now:

function changeLinkStrength(linkStrength) {
if (linkStrength >= 0 && linkStrength<=1) {
webweb.display.linkStrength = linkStrength;
webweb.updateSimulation("link");
}
else {
alert("Link strength must be between 0 and 1");
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants