Skip to content

Commit d8ba40d

Browse files
committed
worker demo. "px" is required for inline style's left
1 parent 0e4aff9 commit d8ba40d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/worker-main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
var direction = 39; // right
4444

4545
square.style.top = 0;
46-
square.style.left = 20;
46+
square.style.left = '20px';
4747
square.style.height = SQUARE_SIZE;
4848
square.style.width = SQUARE_SIZE;
4949

@@ -89,4 +89,4 @@
8989
// start the square animating
9090
requestAnimationFrame(moveSquare);
9191

92-
}());
92+
}());

0 commit comments

Comments
 (0)