Fixed problem with transform origin. When origin was not the same as
center, the viewport had a wrong translation offset.