From 3c099a96b76b5396d8f667cd09fc807d25bae970 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 25 Sep 2012 19:32:08 +0200 Subject: [PATCH] No longer tap-selecting elements on touch devices This finalizes the effort to improve map browser event handling. --- css/ol.css | 10 ++++++++++ demos/full-screen/template.html.in | 1 + demos/proj4js/template.html.in | 1 + demos/side-by-side/template.html.in | 1 + demos/two-layers/template.html.in | 1 + src/ol/map.js | 1 - 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/css/ol.css b/css/ol.css index 6888d86d08..648a9e87fe 100644 --- a/css/ol.css +++ b/css/ol.css @@ -1,3 +1,13 @@ +.ol-viewport { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + .ol-renderer-webgl-canvas { width:100%; height:100%; } .olTile { diff --git a/demos/full-screen/template.html.in b/demos/full-screen/template.html.in index bfaadb3241..792c77202d 100644 --- a/demos/full-screen/template.html.in +++ b/demos/full-screen/template.html.in @@ -10,6 +10,7 @@ height: 100%; } + ol3 full-screen demo diff --git a/demos/proj4js/template.html.in b/demos/proj4js/template.html.in index 11dbe2f521..ccd62f8a86 100644 --- a/demos/proj4js/template.html.in +++ b/demos/proj4js/template.html.in @@ -1,6 +1,7 @@ + ol3 proj4js demo diff --git a/demos/side-by-side/template.html.in b/demos/side-by-side/template.html.in index 0e9ced36a5..161dca194d 100644 --- a/demos/side-by-side/template.html.in +++ b/demos/side-by-side/template.html.in @@ -8,6 +8,7 @@ border: thin solid; } + ol3 side-by-side demo diff --git a/demos/two-layers/template.html.in b/demos/two-layers/template.html.in index 0e3abdb732..4bc97589b3 100644 --- a/demos/two-layers/template.html.in +++ b/demos/two-layers/template.html.in @@ -8,6 +8,7 @@ border: thin solid; } + ol3 two-layers demo diff --git a/src/ol/map.js b/src/ol/map.js index 4372cbad2b..77f1792a12 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -1,4 +1,3 @@ -// FIXME better map browser event types // FIXME recheck layer/map projection compatability when projection changes // FIXME layer renderers should skip when they can't reproject // FIXME add tilt and height?