Add FastClick in mobile-full-screen example
This commit is contained in:
@@ -290,6 +290,7 @@ def examples_star_json(name, match):
|
|||||||
"externs/bootstrap.js",
|
"externs/bootstrap.js",
|
||||||
"externs/closure-compiler.js",
|
"externs/closure-compiler.js",
|
||||||
"externs/example.js",
|
"externs/example.js",
|
||||||
|
"externs/fastclick.js",
|
||||||
"externs/geojson.js",
|
"externs/geojson.js",
|
||||||
"externs/jquery-1.9.js",
|
"externs/jquery-1.9.js",
|
||||||
"externs/proj4js.js",
|
"externs/proj4js.js",
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"externs/bootstrap.js",
|
"externs/bootstrap.js",
|
||||||
"externs/closure-compiler.js",
|
"externs/closure-compiler.js",
|
||||||
"externs/example.js",
|
"externs/example.js",
|
||||||
|
"externs/fastclick.js",
|
||||||
"externs/geojson.js",
|
"externs/geojson.js",
|
||||||
"externs/jquery-1.9.js",
|
"externs/jquery-1.9.js",
|
||||||
"externs/proj4js.js",
|
"externs/proj4js.js",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
<script src="../resources/jquery.min.js" type="text/javascript"></script>
|
<script src="../resources/jquery.min.js" type="text/javascript"></script>
|
||||||
<script src="../resources/example-behaviour.js" type="text/javascript"></script>
|
<script src="../resources/example-behaviour.js" type="text/javascript"></script>
|
||||||
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.3/fastclick.js" type="text/javascript"></script>
|
||||||
<script src="loader.js?id=mobile-full-screen" type="text/javascript"></script>
|
<script src="loader.js?id=mobile-full-screen" type="text/javascript"></script>
|
||||||
|
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
|
|||||||
@@ -32,3 +32,11 @@ geolocation.once('change:position', function() {
|
|||||||
view.setCenter(geolocation.getPosition());
|
view.setCenter(geolocation.getPosition());
|
||||||
view.setResolution(2.388657133911758);
|
view.setResolution(2.388657133911758);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Use FastClick to eliminate the 300ms delay between a physical tap
|
||||||
|
// and the firing of a click event on mobile browsers.
|
||||||
|
// See http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away
|
||||||
|
// for more information.
|
||||||
|
$(function() {
|
||||||
|
FastClick.attach(document.body);
|
||||||
|
});
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* @fileoverview Externs for FastClick 1.0.3
|
||||||
|
* @see https://github.com/ftlabs/fastclick
|
||||||
|
* @externs
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Object}
|
||||||
|
* @const
|
||||||
|
*/
|
||||||
|
var FastClick = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{
|
||||||
|
* touchBoundary: (number|undefined),
|
||||||
|
* tapDelay: (number|undefined)
|
||||||
|
* }}
|
||||||
|
*/
|
||||||
|
FastClick.AttachOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Element} layer
|
||||||
|
* @param {FastClick.AttachOptions=} opt_options
|
||||||
|
*/
|
||||||
|
FastClick.attach = function(layer, opt_options) {};
|
||||||
Reference in New Issue
Block a user