Zoom property

Gets or sets the magnification level of Smartframe.

Smartframe.Zoom = [integer]

Where integer is the Smartframe magnification percentage.

Applies To

Smartframe

Version Support

Introduced in version 11.1.0.

Use

The Zoom property has been implemented to extend the current manual zoom functionality in Smartframe:

The zoom settings are useful for users who may want to adjust the size of Smartframe content. The magnification percentage selected, using either the Smartframe zoom panel or the keyboard shortcuts CTRL +/-, will persist between Smartframe sessions.

The Smartframe.Zoom property can be used to query the current zoom value and set it at runtime, if you would prefer to handle this in your template.

Be AWARE:

If you explicitly set Smartframe.Zoom in your template, this will overwrite any changes that the user makes, via the zoom panel or Ctrl +/-, that would otherwise persist.

Example

// Display the current zoom setting in a field on the template and provide an input box on the template for the user to change the zoom value.

 

$(document).ready(function () {

 

// Get the current SmartFrame.Zoom value

$('#CurrentZoom').text("Current Zoom: " + SmartFrame.Zoom);

 

$('#ZoomButton').click(function() {

    var zoomValue = $('#ZoomInput').val();

 

    // Set the SmartFrame.Zoom

    SmartFrame.Zoom = zoomValue;

 

    $('#CurrentZoom').text("Current Zoom: " + SmartFrame.Zoom);

});

});

See Also

Smartframe | Customizing Smartframe templates | Close method | OnClosing event | Smartframe Newlook Control API

Applies To

Smartframe


© 2004-2021 looksoftware. All rights reserved.