Fix scale/translate when viewport have lesser size than canvas.