Change logic to determine viewer dimensions to be based on width.