Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

Zoom Module

The Zoom Module is used to set the zoom size of the text or page.

Syntax

zoom (Module) <META> Syntax

<META HTTP-Equiv="zoom" content="[Parameter]">

Zoom JavaScript Object Syntax:
By default the JavaScript Object 'zoom' will exist on the current page and can be used to interact directly with the zoom.
To Set zoom parameters via JavaScript use the following syntax: zoom.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. zoom.text = 'value';
To set multiple EMML parameters / events on a single line use the following syntax: zoom.setEMML("[Your EMML Tags]");

e.g. zoom.setEMML("text:value");
Zoom Ruby Object Syntax:
By default the Ruby Object 'Zoom' will exist on the current page and can be used to interact directly with the Zoom. All Methods, Parameters and Events are the same as JavaScript, however, notice 'Zoom' needs to start with an uppercase letter. Another difference in Ruby is that methods do not end in '()'
To Set Zoom parameters via Ruby use the following syntax: Zoom.parameter = 'value' remembering to enclose your value in quotes where appropriate.

e.g. Zoom.text = 'value'

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description Default Value
text:[Value] Number in the range 0 to 4 Sets the font size to be displayed on the page, set to 0 for the smallest font and 4 for the largest font. 2
page:[Value] Number greater than 0.0 Sets the zoom factor of the page. Factor 1.0 is no zoom, values less than 1.0 are zoomed out and values greater than 1.0 are zoomed in. In android,zoom will take effect after page refresh or page transition. 1.0

Requirements

RhoElements Version 1.0.0 or above
Supported Devices All supported devices.
Minimum Requirements None.
Persistence Persistent - Changes to this module will persist when navigating to a new page.

HTML/JavaScript Examples

The following example uses zoom to set the text zoom level to the smallest:

<META HTTP-Equiv="zoom" Content="text:0">

The following example will zoom the page to enable an application written for a QVGA screen to be displayed properly on a VGA screen:

<META HTTP-Equiv="zoom" Content="page:2.0">
Back to Top