Gets the style.width pixels on the specified element if present, otherwise its offsetWidth.
(element: HTMLElement)
| 67 | |
| 68 | /** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */ |
| 69 | protected getElementWidth(element: HTMLElement) { |
| 70 | // Optimization: Check style.width first as we probably set it already before reading |
| 71 | // offsetWidth which triggers layout. |
| 72 | return ( |
| 73 | coercePixelsFromCssValue(element.style.width) || |
| 74 | this._elemSizeCache.get(element)?.width || |
| 75 | element.offsetWidth |
| 76 | ); |
| 77 | } |
| 78 | |
| 79 | /** Informs the ResizeStrategy instance of a column that may be resized in the future. */ |
| 80 | registerColumn(column: HTMLElement) { |
nothing calls this directly
no test coverage detected