2023-05-07 08:37:03 -07:00
|
|
|
---
|
|
|
|
title: Stack.home()
|
|
|
|
---
|
|
|
|
|
2023-05-26 18:42:20 -07:00
|
|
|
The `Stack.home()` method calculates the stack's bounding box,
|
|
|
|
setting the `width`, `height`, `topLeft`, and `bottomRight` properties,
|
2023-05-07 08:37:03 -07:00
|
|
|
and returns the original stack.
|
|
|
|
|
|
|
|
## Stack.home() signature
|
|
|
|
|
|
|
|
```js
|
|
|
|
Stack stack.home()
|
|
|
|
```
|
2024-09-29 07:14:59 +02:00
|
|
|
|
|
|
|
:::note
|
|
|
|
This method is chainable as it returns the Stack object
|
|
|
|
:::
|
2023-05-07 08:37:03 -07:00
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
The bounding box is calculated taking into consideration the `margin` setting.
|
2023-05-26 18:42:20 -07:00
|
|
|
|
|
|
|
`Stack.home()` caches its calculations by checking whether the stack's
|
|
|
|
`topLeft` property has been set.
|
|
|
|
If `topLeft` has a truthy value, it will not re-calculate.
|