Remove zoom out animation when dragging point on the chart
This commit is contained in:
parent
569dc21c4c
commit
4cb68abd43
1 changed files with 4 additions and 4 deletions
|
@ -145,9 +145,9 @@ public class TrackDetailsMenu {
|
||||||
if (point != null) {
|
if (point != null) {
|
||||||
int index = segment.points.indexOf(point);
|
int index = segment.points.indexOf(point);
|
||||||
gpxItem.locationOnMap = GPXLayer.createProjectionPoint(segment.points.get(index - 1), point, tb.getLatLonFromPixel(mx, my));
|
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 pos = (float) (gpxItem.locationOnMap.distance / ((OrderedLineDataSet) ds.get(0)).getDivX());
|
||||||
float nextVisibleX = chart.getLowestVisibleX() + (nextHighlightPos - gpxItem.chartHighlightPos);
|
float nextVisibleX = chart.getLowestVisibleX() + (pos - gpxItem.chartHighlightPos);
|
||||||
gpxItem.chartHighlightPos = nextHighlightPos;
|
gpxItem.chartHighlightPos = pos;
|
||||||
|
|
||||||
chart.moveViewToX(nextVisibleX);
|
chart.moveViewToX(nextVisibleX);
|
||||||
chart.highlightValue(gpxItem.chartHighlightPos, 0);
|
chart.highlightValue(gpxItem.chartHighlightPos, 0);
|
||||||
|
@ -613,7 +613,7 @@ public class TrackDetailsMenu {
|
||||||
lastPerformedGesture == ChartGesture.ROTATE) {
|
lastPerformedGesture == ChartGesture.ROTATE) {
|
||||||
|
|
||||||
gpxItem.chartMatrix = new Matrix(chart.getViewPortHandler().getMatrixTouch());
|
gpxItem.chartMatrix = new Matrix(chart.getViewPortHandler().getMatrixTouch());
|
||||||
refreshChart(chart, true);
|
refreshChart(chart, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue