Zoom functions zoom in and out in Design view.

dreamweaver.activeViewScale()

Availability

Dreamweaver 8.

Description

The activeViewScale property gets or sets a mutable floating-point. When you get the value, Dreamweaver returns the scale of the active view as it appears in the Zoom combo box, divided by 100. For example, 100% is 1.0; 50% is 0.5, and so on. When you set the value, Dreamweaver sets the value in the Zoom combo box. The value can be between 0.06 and 64.00, which correspond to 6% and 6400%.

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

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.

Enabler

Example

 if (canFitSeletion()){ 
    fitSelection(); 
    }

dreamweaver.fitWidth()

Availability

Dreamweaver 8.

Description

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

Arguments

None.

Returns

Nothing.

Enabler

Example

 if (canZoom()){ 
    fitWidth(); 
    }

dreamweaver.zoomIn()

Availability

Dreamweaver 8.

Description

This function zooms in on the currently active Design view or Live view. The zoom level is the next preset value in the Magnification menu. If there is no next preset value, this function does nothing.

Arguments

None.

Returns

Nothing.

Enabler

Example

 if (canZoom()){ 
    zoomIn(); 
    }

dreamweaver.zoomOut()

Availability

Dreamweaver 8.

Description

This function zooms out on the currently active Design view or Live view. The zoom level is the next preset value in the Magnification menu. If there is no next preset value, this function does nothing.

Arguments

None.

Returns

Nothing.

Enabler

Example

 if (canZoom()){ 
    zoomOut(); 
    }

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy