Fix
This commit is contained in:
parent
0b983affcb
commit
6d0f38eca6
|
@ -278,13 +278,13 @@ public class ZoomPanView extends FrameLayout implements ScaleGestureDetector.OnS
|
||||||
float scaledWidth=child.getWidth()*targetScale;
|
float scaledWidth=child.getWidth()*targetScale;
|
||||||
float scaledHeight=child.getHeight()*targetScale;
|
float scaledHeight=child.getHeight()*targetScale;
|
||||||
if(scaledWidth>getWidth()){
|
if(scaledWidth>getWidth()){
|
||||||
minTransX=(getWidth()-scaledWidth)/2f;
|
minTransX=(getWidth()-Math.round(scaledWidth))/2f;
|
||||||
maxTransX=-minTransX;
|
maxTransX=-minTransX;
|
||||||
}else{
|
}else{
|
||||||
minTransX=maxTransX=0f;
|
minTransX=maxTransX=0f;
|
||||||
}
|
}
|
||||||
if(scaledHeight>getHeight()){
|
if(scaledHeight>getHeight()){
|
||||||
minTransY=(getHeight()-scaledHeight)/2f;
|
minTransY=(getHeight()-Math.round(scaledHeight))/2f;
|
||||||
maxTransY=-minTransY;
|
maxTransY=-minTransY;
|
||||||
}else{
|
}else{
|
||||||
minTransY=maxTransY=0f;
|
minTransY=maxTransY=0f;
|
||||||
|
|
Loading…
Reference in New Issue