Fixed flight event labels getting cut off
This commit is contained in:
parent
0b7d9fe0ef
commit
07c2ce8743
@ -427,7 +427,7 @@ public class SimulationPlot {
|
|||||||
|
|
||||||
// Plot the markers
|
// Plot the markers
|
||||||
if (config.getDomainAxisType() == FlightDataType.TYPE_TIME) {
|
if (config.getDomainAxisType() == FlightDataType.TYPE_TIME) {
|
||||||
|
double markerWidth = 0.7;
|
||||||
// Domain time is plotted as vertical markers
|
// Domain time is plotted as vertical markers
|
||||||
for (int i = 0; i < eventTimes.size(); i++) {
|
for (int i = 0; i < eventTimes.size(); i++) {
|
||||||
double t = eventTimes.get(i);
|
double t = eventTimes.get(i);
|
||||||
@ -441,6 +441,10 @@ public class SimulationPlot {
|
|||||||
m.setAlpha(0.7f);
|
m.setAlpha(0.7f);
|
||||||
m.setLabelFont(new Font("Dialog", Font.PLAIN, 13));
|
m.setLabelFont(new Font("Dialog", Font.PLAIN, 13));
|
||||||
plot.addDomainMarker(m);
|
plot.addDomainMarker(m);
|
||||||
|
|
||||||
|
if (t > plot.getDomainAxis().getUpperBound() - markerWidth) {
|
||||||
|
plot.setDomainAxis(new PresetNumberAxis(plot.getDomainAxis().getLowerBound(), t + markerWidth));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user