Refactor calculateScalingFactor so that it takes into account when the x position is off the screen
Merge pull request #7 from fay-jai/scaleAndResize

Refactor calculateScalingFactor