Commit a3e6bac4 authored by Marcus Lundblad's avatar Marcus Lundblad

All work can be a bit dull…

Sometimes we want to have some fun and just
do something for kicks… 
parent 7b5ae2ea
Pipeline #101558 passed with stage
in 8 minutes and 45 seconds
......@@ -212,6 +212,10 @@ var MainWindow = GObject.registerClass({
accels: ['<Primary>L'],
onActivate: () => this._onGotoUserLocationActivate()
},
'goto-antipode-location': {
accels: ['<Primary>A'],
onActivate: () => this._mapView.gotoAntipode()
},
'toggle-sidebar': {
accels: ['<Primary>D'],
state: ['b', false],
......
......@@ -444,6 +444,18 @@ var MapView = GObject.registerClass({
this._userLocation.goTo(animate);
}
gotoAntipode() {
let lat = -this.view.latitude;
let lon = this.view.longitude > 0 ?
this.view.longitude - 180 : this.view.longitude + 180;
let place =
new Place.Place({ location: new Location.Location({ latitude: lat,
longitude: lon }),
initialZoom: this.view.zoom_level });
new MapWalker.MapWalker(place, this).goTo(true);
}
userLocationVisible() {
let box = this.view.get_bounding_box();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment