(boundary: HTMLElement)
| 272 | } |
| 273 | |
| 274 | getOffsetHeight(boundary: HTMLElement) { |
| 275 | const scale = this.props.scale as number; |
| 276 | switch (this.props.bounds) { |
| 277 | case "window": |
| 278 | return window.innerHeight / scale; |
| 279 | case "body": |
| 280 | return document.body.offsetHeight / scale; |
| 281 | default: |
| 282 | return boundary.offsetHeight; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | getOffsetWidth(boundary: HTMLElement) { |
| 287 | const scale = this.props.scale as number; |