summaryrefslogtreecommitdiff
path: root/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'bundle.js')
-rw-r--r--bundle.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundle.js b/bundle.js
index f3cc5fe..07ad2db 100644
--- a/bundle.js
+++ b/bundle.js
@@ -23073,7 +23073,7 @@ var hexes = void 0,
function init() {
if (_util.browser.isMobile) {
document.addEventListener('touchstart', touch(down));
- document.addEventListener('touchmove', touch(move));
+ document.addEventListener('touchmove', touch(move, true));
document.addEventListener('touchend', touch(up));
} else {
document.addEventListener('mousedown', down);
@@ -23181,9 +23181,10 @@ function find(hex) {
if (id in hexes) return hexes[id];
return null;
}
-function touch(fn) {
+function touch(fn, shouldPreventDefault) {
return function (e) {
- return fn(e.touches[0]);
+ shouldPreventDefault && e.preventDefault();
+ fn(e.touches[0]);
};
}
function polygon(n, side) {