Cleaned up code for merge.

#story[889]
This commit is contained in:
Kusal Ekanayake
2017-05-15 17:21:56 +12:00
parent 110143ae6e
commit fa501460cb
7 changed files with 17 additions and 108 deletions
@@ -244,7 +244,7 @@ public class CanvasController {
}
private void checkForCourseChanges() {
if (StreamParser.isNewXmlRecieved()){
if (StreamParser.isNewRaceXmlReceived()){
System.out.println("New Canvas found");
gc.setFill(Color.SKYBLUE);
gc.fillRect(0,0, CANVAS_WIDTH, CANVAS_HEIGHT);
@@ -357,7 +357,8 @@ public class CanvasController {
* Calculates x and y location for every marker that fits it to the canvas the race will be drawn on.
*/
private void fitMarksToCanvas() {
StreamParser.isNewXmlRecieved();
//Check is called once to avoid unnecessarily change the course limits once the race is running
StreamParser.isNewRaceXmlReceived();
findMinMaxPoint();
double minLonToMaxLon = scaleRaceExtremities();
calculateReferencePointLocation(minLonToMaxLon);