diff options
Diffstat (limited to 'bundle.js')
| -rw-r--r-- | bundle.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) { |
