(render = true)
| 186 | } |
| 187 | |
| 188 | function resize(render = true) { |
| 189 | rect = $scrollbar.getBoundingClientRect(); |
| 190 | height = rect.height - 20 - thumbHeight; |
| 191 | width = rect.width - 20 - thumbHeight; |
| 192 | |
| 193 | if (height < 0) height = 0; |
| 194 | if (width < 0) width = 0; |
| 195 | if (render && height && width) setValue(scroll); |
| 196 | } |
| 197 | |
| 198 | function setValue(val) { |
| 199 | if (!height || !width) resize(false); |
no test coverage detected