Remove zoom out animation when dragging point on the chart

This commit is contained in:
Vitaliy 2020-07-02 10:12:15 +03:00
parent 569dc21c4c
commit 4cb68abd43

View file

@ -145,9 +145,9 @@ 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));
float nextHighlightPos = (float) (gpxItem.locationOnMap.distance / ((OrderedLineDataSet) ds.get(0)).getDivX());
float nextVisibleX = chart.getLowestVisibleX() + (nextHighlightPos - gpxItem.chartHighlightPos);
gpxItem.chartHighlightPos = nextHighlightPos;
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);
@ -613,7 +613,7 @@ public class TrackDetailsMenu {
lastPerformedGesture == ChartGesture.ROTATE) {
gpxItem.chartMatrix = new Matrix(chart.getViewPortHandler().getMatrixTouch());
refreshChart(chart, true);
refreshChart(chart, false);
}
}
}