Bigger + and - zoom buttons on touch devices

This commit is contained in:
Éric Lemoine
2013-04-14 23:28:45 +02:00
parent 71fb6087fe
commit b501230164
2 changed files with 9 additions and 0 deletions

View File

@@ -140,6 +140,12 @@ a.ol-full-screen-true:after {
line-height: 19px;
background: rgba(0,60,136,0.5);
}
.ol-touch .ol-zoom a {
font-size: 20px;
height: 30px;
width: 30px;
line-height: 26px;
}
.ol-zoom a:hover {
background: rgba(0,60,136,0.7);
}

View File

@@ -207,6 +207,9 @@ ol.Map = function(options) {
this.viewport_.style.height = '100%';
// prevent page zoom on IE >= 10 browsers
this.viewport_.style.msTouchAction = 'none';
if (ol.BrowserFeature.HAS_TOUCH) {
this.viewport_.className = 'ol-touch';
}
goog.dom.appendChild(this.target_, this.viewport_);
/**