The following list contains properties exposed by the paper object:
svg
- a reference to the SVG document object the paper uses to render all the graphics.layers
- a reference to the SVG group <g>
element that contains all the layers of the paper. Paper transformations such as scale is performed on this element and it affects all the layers inside.cells
(cells layer) - a reference to the SVG group <g>
element the paper wraps all the rendered elements and links into.tools
(tools layer) - a reference to the SVG group <g>
element the paper wraps all the rendered tools into.defs
- a reference to the SVG <defs> element used to define SVG elements for later reuse. This is also a good place to put SVG masks, patterns, filters and gradients.Normally, you do not need to access these properties directly but in some (advanced) situations, it is handy to have access to them.