Merge pull request #4008 from osmandapp/gpx_improvements
Add sync for point
This commit is contained in:
commit
38a347a836
1 changed files with 6 additions and 2 deletions
|
@ -316,9 +316,13 @@ public class TrackDetailsMenu {
|
||||||
if (highlights != null && highlights.length > 0) {
|
if (highlights != null && highlights.length > 0) {
|
||||||
if (minimumVisibleXValue != 0 && maximumVisibleXValue != 0) {
|
if (minimumVisibleXValue != 0 && maximumVisibleXValue != 0) {
|
||||||
if (highlights[0].getX() < minimumVisibleXValue) {
|
if (highlights[0].getX() < minimumVisibleXValue) {
|
||||||
gpxItem.chartHighlightPos = minimumVisibleXValue;
|
float difference = (maximumVisibleXValue - minimumVisibleXValue) * 0.1f;
|
||||||
|
gpxItem.chartHighlightPos = minimumVisibleXValue + difference;
|
||||||
|
chart.highlightValue(minimumVisibleXValue + difference, 0);
|
||||||
} else if (highlights[0].getX() > maximumVisibleXValue) {
|
} else if (highlights[0].getX() > maximumVisibleXValue) {
|
||||||
gpxItem.chartHighlightPos = maximumVisibleXValue;
|
float difference = (maximumVisibleXValue - minimumVisibleXValue) * 0.1f;
|
||||||
|
gpxItem.chartHighlightPos = maximumVisibleXValue - difference;
|
||||||
|
chart.highlightValue(maximumVisibleXValue - difference, 0);
|
||||||
} else {
|
} else {
|
||||||
gpxItem.chartHighlightPos = highlights[0].getX();
|
gpxItem.chartHighlightPos = highlights[0].getX();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue