Skip to content

Commit

Permalink
moved init code to bottom, so that canvas element is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
rafd committed Sep 19, 2012
1 parent 2da4d7d commit 735b1aa
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@

setupCAAT();
}
if (typeof(AppMobi) === "undefined") {
setupCAAT();
} else {
document.addEventListener("appMobi.device.ready",onDeviceReady,false);
}

</script>

</head>
Expand All @@ -90,4 +86,12 @@

<canvas id="thecanvas"></canvas>

<script>
if (typeof(AppMobi) === "undefined") {
setupCAAT();
} else {
document.addEventListener("appMobi.device.ready",onDeviceReady,false);
}
</script>

</html>

0 comments on commit 735b1aa

Please sign in to comment.