Home | History | Annotate | Download | only in src

Lines Matching full:overlay

10  * You can turn any div into an overlay. Note that while an
11 * overlay element is shown, its parent is changed. Hiding the overlay
15 base.requireStylesheet('overlay');
31 this.classList.add('overlay-root');
48 * Adds an overlay, attaching it to the contentHost so that it is visible.
50 showOverlay: function(overlay) {
51 // Reparent this to the overlay content host.
52 overlay.oldParent_ = overlay.parentNode;
53 this.contentHost.appendChild(overlay);
56 // Show the overlay root.
57 this.ownerDocument.body.classList.add('disabled-by-overlay');
60 // Bring overlay into focus.
61 overlay.tabIndex = 0;
63 overlay.querySelector('button, input, list, select, a');
65 focusElement = overlay;
70 // leaving the overlay.
73 overlay.addEventListener('keydown', this.onKeydownBoundToThis_);
77 * Clicking outside of the overlay will de-focus the overlay. The
80 * the overlay.
89 * Prevents forward-tabbing out of the overlay
102 * Prevent the user from shift-tabbing backwards out of the overlay.
113 * Hides an overlay, attaching it to its original parent if needed.
115 hideOverlay: function(overlay) {
116 // hide the overlay root
118 this.ownerDocument.body.classList.remove('disabled-by-overlay');
121 // put the overlay back on its previous parent
122 overlay.parentNode.removeChild(this.tabCatcher);
123 if (overlay.oldParent_) {
124 overlay.oldParent_.appendChild(overlay);
125 delete overlay.oldParent_;
127 this.contentHost.removeChild(overlay);
131 overlay.removeEventListener('keydown', this.onKeydownBoundToThis_);
140 * Creates a new overlay element. It will not be visible until shown.
145 var Overlay = tracing.ui.define('div');
147 Overlay.prototype = {
151 * Initializes the overlay element.
154 // create the overlay root on this document if its not present
155 if (!this.ownerDocument.querySelector('.overlay-root')) {
161 this.classList.add('overlay');
172 var overlayRoot = this.ownerDocument.querySelector('.overlay-root');
228 * Shows and hides the overlay. Note that while visible == true, the overlay
231 base.defineProperty(Overlay, 'visible', base.PropertyKind.BOOL_ATTR,
232 Overlay.prototype.onVisibleChanged_);
233 base.defineProperty(Overlay, 'defaultClickShouldClose',
237 Overlay: Overlay