4ddcc7537f
Makes the code easier to follow and makes sure that viewDrag is properly disabled when scaling. Fixes #1110.