Skip to content

Commit 7d43e8f

Browse files
committed
URL fixed, graph start node wrap around
1 parent f8a2a95 commit 7d43e8f

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

package-lock.json

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"test-hashinsert": "npm test -- ./src/algorithms/controllers/tests/HashingInsertion.test.js",
2222
"test-hashsearch": "npm test -- ./src/algorithms/controllers/tests/HashingSearch.test.js",
2323
"test-hashdelete": "npm test -- ./src/algorithms/controllers/tests/HashingDeletion.test.js",
24-
"test-234t": "npm test -- ./src/algorithms/controllers/TTFTree.test.js",
2524
"test-avl": "npm test -- ./src/algorithms/controllers/AVLTree.test.js",
2625
"test-url": "npm test -- ./src/algorithms/parameters/helpers/urlHelpers.test.js"
2726
},
@@ -59,8 +58,6 @@
5958
]
6059
},
6160
"dependencies": {
62-
"nth-check": ">=2.0.1",
63-
"postcss": ">=8.4.31",
6461
"@emotion/react": "^11.11.1",
6562
"@emotion/styled": "^11.11.0",
6663
"@mui/icons-material": "^5.14.3",
@@ -70,12 +67,13 @@
7067
"@popperjs/core": "^2.11.8",
7168
"@testing-library/jest-dom": "^4.2.4",
7269
"@testing-library/react": "^12.1.2",
73-
"@testing-library/react-hooks": "^8.0.1",
7470
"@testing-library/user-event": "^14.4.3",
7571
"chai": "^5.1.1",
7672
"denque": "^2.0.1",
7773
"framer-motion": "^4.0.0",
7874
"lodash": "^4.17.21",
75+
"nth-check": ">=2.0.1",
76+
"postcss": ">=8.4.31",
7977
"prop-types": "^15.8.1",
8078
"react": "^17.0.2",
8179
"react-dom": "^17.0.2",
@@ -93,6 +91,7 @@
9391
},
9492
"devDependencies": {
9593
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
94+
"@testing-library/react-hooks": "^8.0.1",
9695
"electron": "^31.4.0",
9796
"enzyme": "^3.11.0",
9897
"eslint-config-react-app": "^7.0.1",

src/algorithms/parameters/helpers/EuclideanMatrixParams.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ function EuclideanMatrixParams({
395395
// Update start node
396396
// useEffect() triggers handleSearch() to update animation
397397
const updateStartNode = (newStart) => {
398-
if (newStart < 1 || newStart > size) return;
398+
// use modulo size to wrap around in range 1..size
399+
newStart = (newStart + size - 1) % size + 1;
399400
setMessage(null);
400401
setStartNode(newStart);
401402
// handleSearch();

0 commit comments

Comments
 (0)