Kirl
08-18-2007, 09:48 PM
I have written a javascript version of tetris and at every 10th cleared line, I change the body background color more towards red. However, the page only seems to update parts of the background. It is only after min/maxing the window or otherwise forcing a redraw that the whole page background is actually updated to the correct color.
Any idea why this is and if/how this can be fixed?
This line works as expected, but it may be relevant to highlight.
document.body.style.backgroundColor = "rgb(255," +GB+ "," +GB+ ")";
If you manage to clear 10 lines you can see it yourself (http://www.kirl.nl/tetriix.php). :)
Tested in Opera, other browser may have trouble.
Any idea why this is and if/how this can be fixed?
This line works as expected, but it may be relevant to highlight.
document.body.style.backgroundColor = "rgb(255," +GB+ "," +GB+ ")";
If you manage to clear 10 lines you can see it yourself (http://www.kirl.nl/tetriix.php). :)
Tested in Opera, other browser may have trouble.