* Helper function to create an overflow element if one doesn't exist * @param {!Window} global * @param {!Element} container * @param {number} height
(global, container, height)
| 136 | * @param {number} height |
| 137 | */ |
| 138 | function createOverflowElement(global, container, height) { |
| 139 | const overflow = global.document.createElement('div'); |
| 140 | overflow.id = 'overflow'; |
| 141 | |
| 142 | overflow.addEventListener('click', () => { |
| 143 | handleResize(global, container, height); |
| 144 | }); |
| 145 | |
| 146 | setStyles(overflow, { |
| 147 | position: 'absolute', |
| 148 | height: `60px`, |
| 149 | bottom: '0', |
| 150 | left: '0', |
| 151 | right: '0', |
| 152 | background: 'green', |
| 153 | cursor: 'pointer', |
| 154 | }); |
| 155 | |
| 156 | const indicator = `<svg id="indicator" fill="#ffffff" width="60" height="60" viewBox="0 0 24.00 24.00" xmlns="http://www.w3.org/2000/svg"><path d="M16.939 7.939 12 12.879l-4.939-4.94-2.122 2.122L12 17.121l7.061-7.06z"></path></svg>`; |
| 157 | |
| 158 | const chevron = global.document.createElement('div'); |
| 159 | setStyles(chevron, { |
| 160 | width: '40px', |
| 161 | height: '40px', |
| 162 | margin: '0 auto', |
| 163 | display: 'block', |
| 164 | }); |
| 165 | |
| 166 | chevron./*OK*/ innerHTML = indicator; |
| 167 | overflow.appendChild(chevron); |
| 168 | container.appendChild(overflow); |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * @param {!Window} global |
no test coverage detected