The clearRect command that I use to clear the canvas before I draw the next pitch count number seems to work in the browser when I test, but not when I create & install the .apk file (see shared Baseball_Tools_Pro project with Appery.io Support). I am using the following code to perform the clear and redraw canvas operation:
function drawPitchCountNumber(pCtr) {
var canvas = document.getElementById("pitchCountCanvas");
if (canvas.getContext) {
var ctx = canvas.getContext("2d");
Code: Select all
// Clear the previously drawn image
ctx.clearRect( 0 , 0 , 250 , 100 ); //Draw the new image
ctx.fillStyle = "white";
ctx.font="bold 70px Arial";
ctx.fillText(pCtr,110,50);
}
}