* Informs FixedLayer that a lightbox was opened. * * - FixedLayer hides any transfer layer elements that may be overlaid on * top of the lightbox, which is confusing UX. * - When `onComplete` resolves, FixedLayer scans and transfers any fixed * descendants of `lightbox`. This enab
(opt_lightbox, opt_onComplete)
| 112 | * UX completes e.g. open transition animation. |
| 113 | */ |
| 114 | enterLightbox(opt_lightbox, opt_onComplete) { |
| 115 | const transferLayer = this.getTransferLayer_(); |
| 116 | if (transferLayer) { |
| 117 | transferLayer.setLightboxMode(true); |
| 118 | } |
| 119 | |
| 120 | if (opt_lightbox && opt_onComplete) { |
| 121 | opt_onComplete.then(() => |
| 122 | this.scanNode_( |
| 123 | dev().assertElement(opt_lightbox), |
| 124 | /* lightboxMode */ true |
| 125 | ) |
| 126 | ); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Reverses the actions performed by `enterLightbox()`. |
no test coverage detected