* Returns a previously measured layout box adjusted to the viewport. This * mainly affects fixed-position elements that are adjusted to be always * relative to the document position in the viewport. * The returned layoutBox is: * - relative to the top of the document for non fixed elemen
()
| 604 | * @return {!../layout-rect.LayoutRectDef} |
| 605 | */ |
| 606 | getLayoutBox() { |
| 607 | if (!this.isFixed_) { |
| 608 | return this.layoutBox_; |
| 609 | } |
| 610 | const viewport = Services.viewportForDoc(this.element); |
| 611 | return moveLayoutRect( |
| 612 | this.layoutBox_, |
| 613 | viewport.getScrollLeft(), |
| 614 | viewport.getScrollTop() |
| 615 | ); |
| 616 | } |
| 617 | |
| 618 | /** |
| 619 | * Returns the first measured layout box. |
no test coverage detected