Merge pull request #9370 from osmandapp/analyze_fixes
Analyze scroll fixes
This commit is contained in:
commit
5dc28cb530
1 changed files with 6 additions and 2 deletions
|
@ -145,7 +145,11 @@ public class TrackDetailsMenu {
|
|||
if (point != null) {
|
||||
int index = segment.points.indexOf(point);
|
||||
gpxItem.locationOnMap = GPXLayer.createProjectionPoint(segment.points.get(index - 1), point, tb.getLatLonFromPixel(mx, my));
|
||||
gpxItem.chartHighlightPos = (float) (gpxItem.locationOnMap.distance / ((OrderedLineDataSet) ds.get(0)).getDivX());
|
||||
float pos = (float) (gpxItem.locationOnMap.distance / ((OrderedLineDataSet) ds.get(0)).getDivX());
|
||||
float nextVisibleX = chart.getLowestVisibleX() + (pos - gpxItem.chartHighlightPos);
|
||||
gpxItem.chartHighlightPos = pos;
|
||||
|
||||
chart.moveViewToX(nextVisibleX);
|
||||
chart.highlightValue(gpxItem.chartHighlightPos, 0);
|
||||
}
|
||||
myLocation = location;
|
||||
|
@ -609,7 +613,7 @@ public class TrackDetailsMenu {
|
|||
lastPerformedGesture == ChartGesture.ROTATE) {
|
||||
|
||||
gpxItem.chartMatrix = new Matrix(chart.getViewPortHandler().getMatrixTouch());
|
||||
refreshChart(chart, true);
|
||||
refreshChart(chart, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue