|
|
|
|
@ -165,6 +165,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
|
|
|
|
* @param abbrev abbreviation of the boat name
|
|
|
|
|
* @param speed speed of the boat
|
|
|
|
|
* @param coordinate coordinate the text appears
|
|
|
|
|
* @param timeSinceLastMark time since the last mark was passed
|
|
|
|
|
*/
|
|
|
|
|
private void displayText(String name, String abbrev, double speed, GraphCoordinate coordinate, ZonedDateTime timeSinceLastMark) {
|
|
|
|
|
String text = "";
|
|
|
|
|
@ -178,7 +179,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
|
|
|
|
}
|
|
|
|
|
//Check speed toggle value
|
|
|
|
|
if (annoSpeed){
|
|
|
|
|
text += String.format("%.2fkn", speed);
|
|
|
|
|
text += String.format("%.2fkn ", speed);
|
|
|
|
|
}
|
|
|
|
|
//Check time since last mark toggle value
|
|
|
|
|
if(annoTimeSinceLastMark){
|
|
|
|
|
@ -304,6 +305,9 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (raceAnno)
|
|
|
|
|
if (Duration.between(boat.getTimeSinceLastMark(), raceClock.getTime()).getSeconds() < 0){
|
|
|
|
|
boat.setTimeSinceLastMark(raceClock.getTime());
|
|
|
|
|
}
|
|
|
|
|
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()), boat.getTimeSinceLastMark());
|
|
|
|
|
//TODO this needs to be fixed.
|
|
|
|
|
drawTrack(boat, colours.get(currentColour));
|
|
|
|
|
|