()
| 2597 | } |
| 2598 | |
| 2599 | open() { |
| 2600 | this.opened = true; |
| 2601 | const viewRef = this.vcr.createEmbeddedView(this.menuTpl); |
| 2602 | // Simulate CDK DomPortalOutlet: after creating the view, move |
| 2603 | // the root nodes to a new "overlay pane" div, just like CDK |
| 2604 | // Overlay does with outletElement.appendChild(rootNode). |
| 2605 | const pane = document.createElement('div'); |
| 2606 | pane.className = 'overlay-pane'; |
| 2607 | document.body.appendChild(pane); |
| 2608 | for (const node of viewRef.rootNodes) { |
| 2609 | pane.appendChild(node); |
| 2610 | } |
| 2611 | this.currentPane = pane; |
| 2612 | } |
| 2613 | |
| 2614 | close() { |
| 2615 | this.opened = false; |
no test coverage detected