Skip to content

Commit

Permalink
URL fixed, graph start node wrap around
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-naish committed Jan 12, 2025
1 parent f8a2a95 commit 7d43e8f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 7 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"test-hashinsert": "npm test -- ./src/algorithms/controllers/tests/HashingInsertion.test.js",
"test-hashsearch": "npm test -- ./src/algorithms/controllers/tests/HashingSearch.test.js",
"test-hashdelete": "npm test -- ./src/algorithms/controllers/tests/HashingDeletion.test.js",
"test-234t": "npm test -- ./src/algorithms/controllers/TTFTree.test.js",
"test-avl": "npm test -- ./src/algorithms/controllers/AVLTree.test.js",
"test-url": "npm test -- ./src/algorithms/parameters/helpers/urlHelpers.test.js"
},
Expand Down Expand Up @@ -59,8 +58,6 @@
]
},
"dependencies": {
"nth-check": ">=2.0.1",
"postcss": ">=8.4.31",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
Expand All @@ -70,12 +67,13 @@
"@popperjs/core": "^2.11.8",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"chai": "^5.1.1",
"denque": "^2.0.1",
"framer-motion": "^4.0.0",
"lodash": "^4.17.21",
"nth-check": ">=2.0.1",
"postcss": ">=8.4.31",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -93,6 +91,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@testing-library/react-hooks": "^8.0.1",
"electron": "^31.4.0",
"enzyme": "^3.11.0",
"eslint-config-react-app": "^7.0.1",
Expand Down
3 changes: 2 additions & 1 deletion src/algorithms/parameters/helpers/EuclideanMatrixParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ function EuclideanMatrixParams({
// Update start node
// useEffect() triggers handleSearch() to update animation
const updateStartNode = (newStart) => {
if (newStart < 1 || newStart > size) return;
// use modulo size to wrap around in range 1..size
newStart = (newStart + size - 1) % size + 1;
setMessage(null);
setStartNode(newStart);
// handleSearch();
Expand Down

0 comments on commit 7d43e8f

Please sign in to comment.