Scale with the wheel and move with the mouse are now working correctly.
Refactor the centertofit