Add double-tap to zoom out.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent e7b32f9fd1
commit 728028563c

@ -335,7 +335,7 @@ class CropScaleImageViewController: OWSViewController {
let srcCropSizeAfterScalePoints = CGSize(width:srcDefaultCropSizePoints.width / imageScale,
height:srcDefaultCropSizePoints.height / imageScale)
// Since the translation state reflects the "upper left" corner of the crop region, we need to
// adjust the translation when scaling.
// adjust the translation when scaling to preserve the "center" of the crop region.
srcTranslation.x += (srcCropSizeBeforeScalePoints.width - srcCropSizeAfterScalePoints.width) * 0.5
srcTranslation.y += (srcCropSizeBeforeScalePoints.height - srcCropSizeAfterScalePoints.height) * 0.5

Loading…
Cancel
Save