Fixed issue where wind arrow, accordion, time, etc. were not being displayed. Fixed issue where zooming would crash when done outside of tutorial. #story[1189]

This commit is contained in:
David Wu
2017-09-10 18:11:52 +12:00
parent bad6422ca9
commit 9a96131a33
3 changed files with 100 additions and 86 deletions
@@ -12,6 +12,7 @@ import javafx.scene.chart.LineChart;
import javafx.scene.control.*;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane;
import javafx.scene.shape.MeshView;
@@ -83,6 +84,7 @@ public class RaceController extends Controller {
@FXML private SplitPane racePane;
/**
* This is the pane we place the actual arrow control inside of.
*/
@@ -209,6 +211,7 @@ public class RaceController extends Controller {
view3D.setYaw(0);
view3D.setPitch(60);
view3D.enableTracking();
//newPane.getChildren().add(view3D);
canvasBase.add(view3D, 0, 0);
// Set up projection from GPS to view
@@ -255,21 +258,25 @@ public class RaceController extends Controller {
if(key != null) {
switch (key.toString()) {
case "Zoom In":
if (currentState.equals(TutorialState.ZOOMIN)) {
try {
checkTutorialState();
} catch (Exception e1) {
e1.printStackTrace();
if (isTutorial) {
if (currentState.equals(TutorialState.ZOOMIN)) {
try {
checkTutorialState();
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
view3D.updateDistance(-10);
break;
case "Zoom Out":
if (currentState.equals(TutorialState.ZOOMOUT)) {
try {
checkTutorialState();
} catch (Exception e1) {
e1.printStackTrace();
if(isTutorial) {
if (currentState.equals(TutorialState.ZOOMOUT)) {
try {
checkTutorialState();
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
view3D.updateDistance(10);