beautypg.com

Dreamweaver.fitall(), Dreamweaver.fitselection() – Adobe Dreamweaver API Reference CS5 User Manual

Page 426

background image

421

DREAMWEAVER API REFERENCE

Design

Last updated 8/27/2013

Example
The following example gets the value of the scale of current view. It also zooms in if it can and if the scale is less than
or equal to 100%:

if (canZoom() && dreamweaver.activeViewScale <= 1.0) {

zoomIn();
}

The following example sets the value of the scale of current view to 50%:

dreamweaver.activeViewScale = 0.50;

dreamweaver.fitAll()

Availability
Dreamweaver 8.

Description
This function zooms in or out so that the entire document fits in the currently visible portion of the Design view.

Arguments
None.

Returns
Nothing.

Enabler
See “

dreamweaver.canZoom()

” on page 510.

Example

if (canZoom()){

fitAll();
}

dreamweaver.fitSelection()

Availability
Dreamweaver 8.

Description
This function zooms in or out so that the current selection fits in the currently visible portion of the Design view.

Arguments
None.

Returns
Nothing.