Bug report from Sarah ...
... the problem seems to be when you have children of a parent SeqGroup of differing types. For example, ParGroups and SeqGroups, or ParGroups and Animations, etc. In the code attached, I have a SeqGroup parent with three different versions of the children. The currently uncommented one (SeqGroup followed by a ParGroup) produces the closest bug to the one in the original Car.html file.
The really interesting bit is the first commented out sgroup (a ParGroup followed by a SeqGroup) produces a slightly different bug. In this case, the animation doesn't play correctly at all, including the first time. The final sgroup is similar to this one.
<style>
.anim {
position: absolute;
height: 100px;
width: 100px;
left: 100px;
}
#a {
background-color: red;
top: 100px;
}
#b {
background-color: blue;
top: 200px;
}
</style>
<script src="web-animation.js"></script>
<script>
var go = function() {
var lightOff = "rgb(50,50,50)";
var aLeft = new Animation(document.querySelector("#a"), {left: ["100px", "200px"]}, {duration: 1});
var aRight = new Animation(document.querySelector("#a"), {left: ["200px", "100px"]}, {duration: 1});
var bLeft = new Animation(document.querySelector("#b"), {left: ["100px", "200px"]}, {duration: 1});
var bRight = new Animation(document.querySelector("#b"), {left: ["200px", "100px"]}, {duration: 1});
var left = new SeqGroup([aLeft, bLeft]);
var right = new ParGroup([aRight, bRight]);
var sgroup = new SeqGroup([left, right]);
//var sgroup = new SeqGroup([right, left]);
//var sgroup = new SeqGroup([left, bRight]);
sgroup.play();
}
var button = document.querySelector("#buttonA");
button.addEventListener('mousedown', go, false);
</script>