beautypg.com

Dreamweaver.getblockvisboxmodelcolors(), Dreamweaver.getblockvisoutlineproperties() – Adobe Dreamweaver API Reference CS5 User Manual

Page 401

background image

396

DREAMWEAVER API REFERENCE

Design

Last updated 8/27/2013

Returns
Nothing.

Example

dw.cssStylePalette.setMediaType("print");

dreamweaver.getBlockVisBoxModelColors()

Availability
Dreamweaver 8.

Description
This function gets the colors used to render the box model for a selected block when the Layout Block Box Model visual
aid is on.

Arguments
None.

Returns
An array of strings that contains two strings:

marginColor

, which is the hexadecimal value of the RGB color, in the form #RRGGBB.

paddingColor

, which is the hexadecimal value of the RGB color, in the form #RRGGBB.

Example
The following example checks the value of the margin and padding color; if either isn’t white, it sets them both to white:

var boxColors = dreamweaver.getBlockVisBoxModelColors();

if ((boxColors[0] != "#FFFFFF") || (boxColors[1] != "#FFFFFF)){

currentDOM.setBlockVisBoxModelColors("#FFFFFF", "#FFFFFF");
}

dreamweaver.getBlockVisOutlineProperties()

Availability
Dreamweaver 8.

Description
This function gets the outline properties for the block visualization visual aids.

Arguments
forWhat

The forWhat argument, which is required, is a string. Possible values are

"divs"

,

"selectedDiv"

, or

"layers"

. If

the forWhat argument is

"divs"

, the function returns the properties used for the visual aid that outlines all layout

blocks. If forWhat is

"selectedDiv"

, the function returns the property used for the visual aid that outlines selected

layout blocks. The

layers

value specifies layers.