summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js4
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/etc/geo.js15
2 files changed, 12 insertions, 7 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
index 785717a8..254df6d1 100644
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
@@ -113,10 +113,10 @@ var ArchiveView = ScrollableView.extend({
touchstart: function(e){
app.archive.row = e.currentTarget
- app.archive.mousedown(e.touches[0])
+ app.archive.mousedown(e.originalEvent.touches[0])
},
touchmove: function(e){
- app.archive.mousemove(e.touches[0])
+ app.archive.mousemove(e.originalEvent.touches[0])
},
touchend: function(e){
app.archive.mouseup()
diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/geo.js b/StoneIsland/platforms/ios/www/js/lib/etc/geo.js
index ab1f8372..fac34c1e 100644
--- a/StoneIsland/platforms/ios/www/js/lib/etc/geo.js
+++ b/StoneIsland/platforms/ios/www/js/lib/etc/geo.js
@@ -6,8 +6,8 @@ var geo = (function(){
}
geo.success = function(position){
- var lat_str = as_degrees( position.coords.latitude )
- var lng_str = as_degrees( position.coords.longitude )
+ var lat_str = as_degrees( position.coords.latitude || 40.99167 )
+ var lng_str = as_degrees( position.coords.longitude || -74.07944 )
$(".latlng").html( lat_str + " " + lng_str )
}
@@ -20,14 +20,19 @@ var geo = (function(){
if (n >= 0) s += "+"
s += Math.floor(n) + "° "
+ n = Math.abs(n)
n %= 1
n *= 60
- s += Math.floor(n) + "'"
+ nn = Math.floor(n)
+ if (nn < 10) nn = "0" + nn
+ s += nn + "' "
n %= 1
n *= 60
-
- s += Math.floor(n) + '"'
+ nn = Math.floor(n)
+ if (nn < 10) nn = "0" + nn
+ s += nn + '"'
+ return s
}
return geo