Implements automatic zooming