()
| 2535 | } |
| 2536 | |
| 2537 | open() { |
| 2538 | this.opened = true; |
| 2539 | const viewRef = this.vcr.createEmbeddedView(this.menuTpl); |
| 2540 | // Simulate CDK DomPortalOutlet: after creating the view, move |
| 2541 | // the root nodes to a new "overlay pane" div, just like CDK |
| 2542 | // Overlay does with outletElement.appendChild(rootNode). |
| 2543 | const pane = document.createElement('div'); |
| 2544 | pane.className = 'overlay-pane'; |
| 2545 | document.body.appendChild(pane); |
| 2546 | for (const node of viewRef.rootNodes) { |
| 2547 | pane.appendChild(node); |
| 2548 | } |
| 2549 | this.currentPane = pane; |
| 2550 | } |
| 2551 | |
| 2552 | close() { |
| 2553 | this.opened = false; |
no test coverage detected