projects
/
lantea.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a42dec
)
care that starting pinch width is set as it should be
author
Robert Kaiser
<robert@widebook.box.kairo.at>
Fri, 16 Aug 2013 04:50:35 +0000
(06:50 +0200)
committer
Robert Kaiser
<robert@widebook.box.kairo.at>
Fri, 16 Aug 2013 04:50:35 +0000
(06:50 +0200)
js/map.js
patch
|
blob
|
blame
|
history
diff --git
a/js/map.js
b/js/map.js
index 77585e27c7eb345cfbc7c346259537f23d50b7bc..6aeacf688794cbdbb33fccde9c89c6b23b93df61 100644
(file)
--- a/
js/map.js
+++ b/
js/map.js
@@
-489,7
+489,7
@@
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);
+ 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);
@@
-513,6
+513,8
@@
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)
);
+ if (!gPinchStartWidth)
+ gPinchStartWidth = curPinchStartWidth;
console.log(gPinchStartWidth + ' <?> ' + curPinchStartWidth);
if (gPinchStartWidth / curPinchStartWidth > 1.7 ||
gPinchStartWidth / curPinchStartWidth < 0.6) {
console.log(gPinchStartWidth + ' <?> ' + curPinchStartWidth);
if (gPinchStartWidth / curPinchStartWidth > 1.7 ||
gPinchStartWidth / curPinchStartWidth < 0.6) {
@@
-537,6
+539,9
@@
var mapEvHandler = {
zoomIn();
else
zoomOut();
zoomIn();
else
zoomOut();
+
+ // Reset pinch start width and start another pinch gesture.
+ gPinchStartWidth = null;
}
}
break;
}
}
break;