Fixed a bug with the canvas height setting.
This commit is contained in:
+3
-3
@@ -29,8 +29,8 @@
|
||||
}
|
||||
|
||||
function updateCanvasHeight(){
|
||||
let h = document.getElementById('canvasHeightTextbox').value;
|
||||
|
||||
let h = document.getElementById('canavasHeightTextbox').value;
|
||||
resizeCanvas(width, h);
|
||||
}
|
||||
|
||||
function toggleForm(enabled){
|
||||
@@ -76,7 +76,7 @@
|
||||
<select id="searchAlgo">
|
||||
<option value="depthFirst">Depth First</option>
|
||||
<option value="breadthFirst">Breadth First</option>
|
||||
<option value="a*">a*</option>
|
||||
<!--<option value="a*">a*</option>-->
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset id="misc" disabled="disabled">
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
var frontier = [];
|
||||
var explored = [];
|
||||
var currentNode = {};
|
||||
var maze = {};
|
||||
var algo = {};
|
||||
|
||||
function setup() {
|
||||
var canvas = createCanvas(500, 500);
|
||||
document.getElementById('canvasWidthTextbox').value = 500;
|
||||
document.getElementById('canavasHeightTextbox').value = 500;
|
||||
canvas.parent('sketch-holder');
|
||||
|
||||
createNewMaze(document.getElementById("cellWidthInput").value);
|
||||
@@ -27,7 +26,7 @@ function draw() {
|
||||
}
|
||||
else if (maze.mazeGenDone && algo.frontier == undefined){
|
||||
maze.resetMazeState();
|
||||
//maze.updateMazeDisplay();
|
||||
|
||||
let selectedAlgo = document.getElementById("searchAlgo").value;
|
||||
let solvingFramerate = document.getElementById("solvingFrameRate").value;
|
||||
if(selectedAlgo == "depthFirst")
|
||||
|
||||
Reference in New Issue
Block a user