projects
/
lantea.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
003d56f
)
remove debugging, reset pinch when ending touch
author
Robert Kaiser
<robert@widebook.box.kairo.at>
Fri, 16 Aug 2013 04:54:49 +0000
(06:54 +0200)
committer
Robert Kaiser
<robert@widebook.box.kairo.at>
Fri, 16 Aug 2013 04:54:49 +0000
(06:54 +0200)
js/map.js
patch
|
blob
|
blame
|
history
diff --git
a/js/map.js
b/js/map.js
index 6aeacf688794cbdbb33fccde9c89c6b23b93df61..dc3ad9c776637595ddbc764b18b111e119dc67ba 100644
(file)
--- a/
js/map.js
+++ b/
js/map.js
@@
-489,7
+489,6
@@
var mapEvHandler = {
Math.pow(aEvent.targetTouches.item(1).clientY -
aEvent.targetTouches.item(0).clientY, 2)
);
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);
}
gDragTouchID = aEvent.changedTouches.item(0).identifier;
coordObj = aEvent.changedTouches.identifiedTouch(gDragTouchID);
@@
-515,7
+514,7
@@
var mapEvHandler = {
);
if (!gPinchStartWidth)
gPinchStartWidth = curPinchStartWidth;
);
if (!gPinchStartWidth)
gPinchStartWidth = curPinchStartWidth;
- console.log(gPinchStartWidth + ' <?> ' + curPinchStartWidth);
+
if (gPinchStartWidth / curPinchStartWidth > 1.7 ||
gPinchStartWidth / curPinchStartWidth < 0.6) {
var newZoomLevel = gPos.z + (gPinchStartWidth < curPinchStartWidth ? 1 : -1);
if (gPinchStartWidth / curPinchStartWidth > 1.7 ||
gPinchStartWidth / curPinchStartWidth < 0.6) {
var newZoomLevel = gPos.z + (gPinchStartWidth < curPinchStartWidth ? 1 : -1);
@@
-544,6
+543,7
@@
var mapEvHandler = {
gPinchStartWidth = null;
}
}
gPinchStartWidth = null;
}
}
+ // If we are in a pinch, do not drag.
break;
}
var x = coordObj.clientX - gMapCanvas.offsetLeft;
break;
}
var x = coordObj.clientX - gMapCanvas.offsetLeft;
@@
-574,6
+574,7
@@
var mapEvHandler = {
break;
case "mouseup":
case "touchend":
break;
case "mouseup":
case "touchend":
+ gPinchStartWidth = null;
gDragging = false;
showUI();
break;
gDragging = false;
showUI();
break;