User Guide
256 Fireworks JavaScript API
dom.setDocumentCanvasSize()
Availability
Fireworks 3.
Usage
dom.setDocumentCanvasSize(boundingRectangle)
Arguments
boundingRectangle A rectangle that specifies the new canvas size for the document,
in pixels (see “Rectangle data type” on page 12). Any items outside the specified rectangle
are removed.
Returns
Nothing.
Description
Sets the document’s canvas size to the specified rectangle.
Example
The following command sets the canvas to a size of 200 by 200 pixels:
fw.getDocumentDOM().setDocumentCanvasSize({left:150, top:150, right:350,
bottom:350});
dom.setDocumentCanvasSizeToDocumentExtents()
Availability
Fireworks 3.
Usage
dom.setDocumentCanvasSizeToDocumentExtents(bGrowCanvas)
Arguments
bGrowCanvas If bGrowCanvas is true, the canvas can expand or shrink in size. If
bGrowCanvas is false, it only shrinks.
Returns
Nothing.