Commits

Anonymous committed e76b663

reset now really resets ;)

Comments (0)

Files changed (1)

 	});
 }
 
-function handleReset()
+function handleReset(cleanStart)
 {
 	width = parseInt(ctlXRes.value);
 	height = parseInt(ctlYRes.value);
 	caSims = [];
 	for (var i = 0; i < nrSims; i++)
 	{
-		if (oldSims.length > i)
+		if (!cleanStart && oldSims.length > i)
 		{
 			caSims[i] = oldSims[i];
 			caSims[i].setSize(colWidth, rowHeight);
 	<input type="number" id="yres" name="yres" min="100" max="4000" value="3333" onchange="handleReset();" />
 	<input type="number" id="randomDensity" min="0" max="1" step="0.001" value="0.01" onchange="handleReset();">
 	<input type="number" id="nrSims" min="1" max="6" step="1" value="5" onchange="handleReset();">
-	<input type="button" value="Reset" onclick="handleReset();">
+	<input type="button" value="Reset" onclick="handleReset(1);">
 	<input type="file" value="evocellFile" id="evocellFile" />
 	fps<input size="1" id="framerate">