// Node dimensions for layout spacing — the body, plus the label box under nodeDimensionsIncludeLabels: true (body-only by default)
ele.layoutDimensions(options?: { nodeDimensionsIncludeLabels?: boolean }): { w: number; h: number; }Node dimensions for layout spacing — the body, plus the label box under nodeDimensionsIncludeLabels: true (body-only by default).
| Name | Description |
|---|---|
options: { nodeDimensionsIncludeLabels?: boolean }?Default: {} |
|
Fields of options
| Name | Description |
|---|---|
nodeDimensionsIncludeLabels: boolean? |
Returns
{ w: number; h: number; }the first element's { w, h }
Example
console.log(cy.nodes().first().layoutDimensions()); // { w: 30, h: 30 }