Aspect ratio: | |
Layout width: | |
Layout height: |
Number of nodes: | |
Node shape: Rectangles Ellipses | |
Minimum side length: | |
Maximum side length: |
This sample demonstrates a custom Layout, PackedLayout, which attempts to pack nodes as close together as possible without overlap. Each node is assumed to be either rectangular or circular (dictated by the 'hasCircularNodes' property). This layout supports packing nodes into either a rectangle or an ellipse, with the shape determined by the PackShape and the aspect ratio determined by either the aspectRatio property, or the specified width and height (depending on the PackMode).
The layout is defined in its own file, as PackedLayout.js, with an additional dependency on Quadtree.js.