Closed brianfoody closed 10 months ago
Same problem here. Any luck @brianfoody ?
Edit: Got a workaround working (I think that's what was meant in tldraw/tldraw-v1#520). It modifies the element's scrollTop value according to the wheel event's deltaY value.
{ onWheel: handler deltaY $ traverse_ \dY -> do
elOrNot <- getElementFromRef containerRef
for_ elOrNot (modifyScrollTop (_ + dY))
}
I am trying to create a custom component where I can scroll the inner content when editing.
Unfortunately I can only scroll with the up / down arrows and the wheel event just gets captured by the canvas, panning the camera.
I am using the core-example-advanced and added a "ScrollBox" shape using the gist code below;
https://gist.github.com/brianfoody/86060ad9dc1132c4a366e80dcbd25f1f