(e)
| 187 | } |
| 188 | |
| 189 | function onPointerMove(e) { |
| 190 | if (!isResizing) return; |
| 191 | const dx = e.clientX - startX; // positive when moving right |
| 192 | // Since the resizer is on the left edge of a right-aligned sidebar, |
| 193 | // moving pointer to the right should make the sidebar narrower. |
| 194 | // Compute new width as startWidth - dx. |
| 195 | let newWidth = Math.round(startWidth - dx); |
| 196 | newWidth = clampWidth(newWidth); |
| 197 | sidebar.style.width = newWidth + 'px'; |
| 198 | } |
| 199 | |
| 200 | function onPointerUp(e) { |
| 201 | if (!isResizing) return; |
nothing calls this directly
no test coverage detected