fixed canvas size on mobile; minor fixes

This commit is contained in:
Bruno Perry 2016-10-17 14:36:55 +01:00
parent e614b7da6a
commit abb077b88f
3 changed files with 15 additions and 1 deletions

View File

@ -20,7 +20,7 @@
</ul>
</div>
<div id="infoTouchDiv" class="center">
Ações:
Acções:
<ul id="touch-elems">
<li id="67">anal</li>
<li id="70">vaginal</li>

View File

@ -29,3 +29,16 @@ div.center {
cursor: pointer;
}
@media only screen and (orientation:portrait) {
div.main {
zoom: 0.7;
-moz-transform: scale(0.7);
}
}
@media only screen and (orientation:landscape) {
div.main {
zoom: 1;
-moz-transform: scale(1);
}
}

View File

@ -65,6 +65,7 @@ function prepareCanvas(canvasDiv, canvasWidth, canvasHeight)
* @author: cc
* Do device validation, fix layout and assign their events
*/
//Check device
if( navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/iPhone|iPad|iPod/i) ||