Zoom functions

 < Day Day Up > 

Zoom functions zoom in and out in Design view.

dreamweaver.activeViewScale()

Availability

Dreamweaver 8.

Description

This function gets or sets a mutable floating point property. When you get the value, Dreamweaver returns the active view's scale 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 current view's scale and 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 current view's scale 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 1078.

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

See "dreamweaver.canFitSelection()" on page 1072.

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

See "dreamweaver.canZoom()" on page 1078.

Example

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

dreamweaver.zoomIn()

Availability

Dreamweaver 8.

Description

This function zooms in on the currently active Design 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

See "dreamweaver.canZoom()" on page 1078.

Example

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

dreamweaver.zoomOut()

Availability

Dreamweaver 8.

Description

This function zooms out on the currently active Design 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

See "dreamweaver.canZoom()" on page 1078.

Example

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

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net