Implemented zoom mode.

A property zoom mode has been added to specify whether the zoom should be done to fit the height or the width of the available space.