ZoomifyViewer.setSize(width,height)

Availability

Flash Player 6.

Usage

ZoomifyViewerInstance.setSize(width,height);

Parameters

width - new width of the image display area.

height - new height of the image display area.

Returns

Nothing

Description

Compensates for changes to ZoomifyViewer width and height to avoid image distortion or skewing. Changing the size of the component on the stage is intended to change the size of the display area, not the size of the image displayed. Calling setSize with the new component width and height as inputs will ensure no image scaling occurs (false zoom), but rather, that more or less of the image fits in the display, as appropriate. Calls to setSize should be followed by a call to updateView in order to cause the ZoomifyViewer component to draw the new view.

Example


var newWidth=ZoomifyViewerInstance.getViewWidth();
var newHeight=ZoomifyViewerInstance.getViewHeight();
ZoomifyViewerInstance.setSize(newWidth,newHeight);
ZoomifyViewerInstance.updateView();

See also

ZoomifyViewer.getViewWidth
ZoomifyViewer.getViewHeight
ZoomifyViewer.updateView