Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "easey", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Easing for Modest Maps", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -53,2 +53,3 @@ ;(function(context, MM) { | ||
function touchStartMachine(e) { | ||
if (!panner) panner = panning(map, 0.10); | ||
MM.addEvent(e.touches[0].target, 'touchmove', | ||
@@ -105,8 +106,2 @@ touchMoveMachine); | ||
function isTouchable() { | ||
var el = document.createElement('div'); | ||
el.setAttribute('ongesturestart', 'return;'); | ||
return (typeof el.ongesturestart === 'function'); | ||
} | ||
function onPinching(e) { | ||
@@ -217,15 +212,9 @@ // use the first two touches and their previous positions | ||
map = x; | ||
// Fail early if this isn't a touch device. | ||
// TODO: move to add fn | ||
if (!isTouchable()) return false; | ||
MM.addEvent(map.parent, 'touchstart', | ||
touchStartMachine); | ||
panner = panning(map, 0.10); | ||
}; | ||
handler.remove = function() { | ||
// Fail early if this isn't a touch device. | ||
if (!isTouchable()) return false; | ||
if (!panner) return; | ||
MM.removeEvent(map.parent, 'touchstart', | ||
@@ -232,0 +221,0 @@ touchStartMachine); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
465523
10074