X-Git-Url: https://git-public.kairo.at//?a=blobdiff_plain;f=js%2Fmap.js;h=6aeacf688794cbdbb33fccde9c89c6b23b93df61;hb=003d56f8a1eee6825cc6c800f135e13df753770d;hp=ce664298e6c478fd3c08576f26b99fe7565c87ac;hpb=7710f0a3d22b1856b08f57b90101c09876f1c89c;p=lantea.git diff --git a/js/map.js b/js/map.js index ce66429..6aeacf6 100644 --- a/js/map.js +++ b/js/map.js @@ -489,6 +489,7 @@ var mapEvHandler = { Math.pow(aEvent.targetTouches.item(1).clientY - aEvent.targetTouches.item(0).clientY, 2) ); + console.log('!!! ' + gPinchStartWidth); } gDragTouchID = aEvent.changedTouches.item(0).identifier; coordObj = aEvent.changedTouches.identifiedTouch(gDragTouchID); @@ -512,6 +513,8 @@ var mapEvHandler = { Math.pow(aEvent.targetTouches.item(1).clientY - aEvent.targetTouches.item(0).clientY, 2) ); + if (!gPinchStartWidth) + gPinchStartWidth = curPinchStartWidth; console.log(gPinchStartWidth + ' ' + curPinchStartWidth); if (gPinchStartWidth / curPinchStartWidth > 1.7 || gPinchStartWidth / curPinchStartWidth < 0.6) { @@ -536,6 +539,9 @@ var mapEvHandler = { zoomIn(); else zoomOut(); + + // Reset pinch start width and start another pinch gesture. + gPinchStartWidth = null; } } break;