()
| 3175 | } |
| 3176 | |
| 3177 | open() { |
| 3178 | this.opened = true; |
| 3179 | const viewRef = this.vcr.createEmbeddedView(this.menuTpl); |
| 3180 | // Simulate CDK DomPortalOutlet: after creating the view, move |
| 3181 | // the root nodes to a new "overlay pane" div, just like CDK |
| 3182 | // Overlay does with outletElement.appendChild(rootNode). |
| 3183 | const pane = document.createElement('div'); |
| 3184 | pane.className = 'overlay-pane'; |
| 3185 | document.body.appendChild(pane); |
| 3186 | for (const node of viewRef.rootNodes) { |
| 3187 | pane.appendChild(node); |
| 3188 | } |
| 3189 | this.currentPane = pane; |
| 3190 | } |
| 3191 | |
| 3192 | close() { |
| 3193 | this.opened = false; |
no test coverage detected