Fixing layout problems with the gesture detector
Extracting scaling method.
Merge pull request #232 from arthurbenemann/gestureDetectorFix

Fix a problem with the layout of the gesture detector.