Sorting animation using generators. Maintains history of all previous states.
xxxxxxxxxx
<head>
<title>blockup</title>
<style>
body {
font-family: Helvetica, sans-serif;
}
.history {
margin-left:50px;
vertical-align: top;
}
input {
width: 0px;
margin-left:10px;
margin-top:8px;
}
</style>
</head>
<body style='width:720px'>
<p style='text-align: center;'>
<button id='start'>Start</button>
<!-- <button id='shuffle'>Shuffle</button> -->
<p>
<div id=svg-container></div>
<div class='history'>
<label for="history-slider">History</label>
<input id="history-slider" disabled type="range" min="0" max="10" step="1" value="0"/>
</div>
<script src='https://d3js.org/d3.v4.min.js'></script>
<script src='script.js'></script>
</body>
https://d3js.org/d3.v4.min.js