Skip to content

Commit 762e16c

Browse files
SimonJacklerhannesa2
authored andcommitted
Fixes issue #4334 where zoomAndCenterAnimated did not center on coordinates.
In static method AnimatedZoomJob:getInstance added the assignment of the parameters zoomCenterX, zoomCenterY, zoomOriginX, zoomOriginY.
1 parent f5c49bf commit 762e16c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

MPChartLib/src/main/java/com/github/mikephil/charting/jobs/AnimatedZoomJob.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public static AnimatedZoomJob getInstance(ViewPortHandler viewPortHandler, View
3535
result.yOrigin = yOrigin;
3636
result.yAxis = axis;
3737
result.xAxisRange = xAxisRange;
38+
result.zoomCenterX = zoomCenterX;
39+
result.zoomCenterY = zoomCenterY;
40+
result.zoomOriginX = zoomOriginX;
41+
result.zoomOriginY = zoomOriginY;
3842
result.resetAnimator();
3943
result.animator.setDuration(duration);
4044
return result;

0 commit comments

Comments
 (0)