Commit 0f70e066 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

added back button to heightmapcontroller

parent a068ec32
......@@ -20,28 +20,24 @@ class HeightMapViewController extends UIViewController {
throw new TypeError("an object of type 'GeoPoint' must be p1assed.");
if (this.model.points.length > 0 && this.model.points[this.model.points.length - 1].distance(geoPoint) < 5)
return;
$("#points").html(this.model.points.length);
this.model.add(geoPoint);
this.drawHeightMap();
}
capture() {
navigator.geolocation.getCurrentPosition(position => {
/* navigator.geolocation.getCurrentPosition(position => {
this.addPoint(new GeoPoint(
position.coords.latitude,
position.coords.longitude,
position.coords.altitude
));
});
/* this.addPoint(new GeoPoint(
});*/
this.addPoint(new GeoPoint(
Std.Random(60, 150),
Std.Random(60, 150),
Std.Random(60, 150)
));*/
));
}
viewDidLoad() {
......
......@@ -63,6 +63,10 @@ class ViewController extends UIViewController {
$(".modal").click((element, event) => {
ViewController.ClearModal();
});
$("#backButton").click(element => {
this.changeState(States.TRACKLIST);
});
}
changeState(newState) {
......@@ -89,6 +93,7 @@ class ViewController extends UIViewController {
break;
case States.HEIGHTMAP:
this.addSubview(new HeightMapViewController("main", new HeightMap(this.track)));
leftButton = "<a id=backButton href=#><span class='fa fa-chevron-left'></span> <span>Zurück</span></a>";
break;
}
......
......@@ -16,8 +16,13 @@ header {
font-weight: bold;
}
span.fa {
font-size: 20px;
span {
vertical-align: middle;
&.fa {
font-size: 20px;
margin-right: 6px;
}
}
a {
......
Supports Markdown
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