Merge pull request #1711 from raynichc/fixes/SimulationPlot
Fixed flight event labels getting cut off
This commit is contained in:
commit
176cab68db
@ -427,6 +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.01 * plot.getDomainAxis().getUpperBound();
|
||||||
|
|
||||||
// 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++) {
|
||||||
@ -441,6 +442,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