From 728028563ce5b11ab814786c81e9d8fc70513595 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 24 Aug 2017 16:39:58 -0400 Subject: [PATCH] Add double-tap to zoom out. // FREEBIE --- Signal/src/ViewControllers/CropScaleImageViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/CropScaleImageViewController.swift b/Signal/src/ViewControllers/CropScaleImageViewController.swift index 6b90c85a5..5eacf3534 100644 --- a/Signal/src/ViewControllers/CropScaleImageViewController.swift +++ b/Signal/src/ViewControllers/CropScaleImageViewController.swift @@ -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