@@ -42,6 +42,7 @@ open class TouchImageView @JvmOverloads constructor(context: Context, attrs: Att
42
42
private var touchMatrix: Matrix
43
43
private var prevMatrix: Matrix
44
44
var isZoomEnabled = false
45
+ var isSuperZoomEnabled = true
45
46
private var isRotateImageToFitScreen = false
46
47
47
48
var orientationChangeFixedPixel: FixedPixel ? = FixedPixel .CENTER
@@ -392,7 +393,7 @@ open class TouchImageView @JvmOverloads constructor(context: Context, attrs: Att
392
393
setScaleType(scaleType!! )
393
394
}
394
395
resetZoom()
395
- scaleImage(scale.toDouble(), viewWidth / 2 .toFloat(), viewHeight / 2 .toFloat(), true )
396
+ scaleImage(scale.toDouble(), viewWidth / 2 .toFloat(), viewHeight / 2 .toFloat(), isSuperZoomEnabled )
396
397
touchMatrix.getValues(floatMatrix)
397
398
floatMatrix[Matrix .MTRANS_X ] = - (focusX * imageWidth - viewWidth * 0.5f )
398
399
floatMatrix[Matrix .MTRANS_Y ] = - (focusY * imageHeight - viewHeight * 0.5f )
@@ -897,7 +898,7 @@ open class TouchImageView @JvmOverloads constructor(context: Context, attrs: Att
897
898
}
898
899
899
900
override fun onScale (detector : ScaleGestureDetector ): Boolean {
900
- scaleImage(detector.scaleFactor.toDouble(), detector.focusX, detector.focusY, true )
901
+ scaleImage(detector.scaleFactor.toDouble(), detector.focusX, detector.focusY, isSuperZoomEnabled )
901
902
902
903
// OnTouchImageViewListener is set: TouchImageView pinch zoomed by user.
903
904
touchImageViewListener?.onMove()
@@ -917,7 +918,7 @@ open class TouchImageView @JvmOverloads constructor(context: Context, attrs: Att
917
918
animateToZoomBoundary = true
918
919
}
919
920
if (animateToZoomBoundary) {
920
- val doubleTap = DoubleTapZoom (targetZoom, (viewWidth / 2 ).toFloat(), (viewHeight / 2 ).toFloat(), true )
921
+ val doubleTap = DoubleTapZoom (targetZoom, (viewWidth / 2 ).toFloat(), (viewHeight / 2 ).toFloat(), isSuperZoomEnabled )
921
922
compatPostOnAnimation(doubleTap)
922
923
}
923
924
}
0 commit comments