lib/atome/renderers/opal/extensions/geolocation.rb in atome-0.4.5.4 vs lib/atome/renderers/opal/extensions/geolocation.rb in atome-0.4.7.0
- old
+ new
@@ -3,10 +3,9 @@
def geolocation
localisation = {latitude: nil, longitude: nil}
$window.navigator.geolocate.then do |pos|
localisation[:latitude] = pos.coords.latitude
localisation[:longitude] = pos.coords.longitude
- # alert self.inspect
end.rescue do |err|
p err
localisation = nil
end
end