()
| 2580 | } |
| 2581 | |
| 2582 | open() { |
| 2583 | this.opened = true; |
| 2584 | const viewRef = this.vcr.createEmbeddedView(this.menuTpl); |
| 2585 | // Simulate CDK DomPortalOutlet: after creating the view, move |
| 2586 | // the root nodes to a new "overlay pane" div, just like CDK |
| 2587 | // Overlay does with outletElement.appendChild(rootNode). |
| 2588 | const pane = document.createElement('div'); |
| 2589 | pane.className = 'overlay-pane'; |
| 2590 | document.body.appendChild(pane); |
| 2591 | for (const node of viewRef.rootNodes) { |
| 2592 | pane.appendChild(node); |
| 2593 | } |
| 2594 | this.currentPane = pane; |
| 2595 | } |
| 2596 | |
| 2597 | close() { |
| 2598 | this.opened = false; |
no test coverage detected