Move scroll ownership from PdfCanvas to canvasContainerRef

Fixkamo-internal
Navios
12 de abril de 2026 às 18:20 UTC
Autor
kamo
Enviar
535741c

PdfCanvas root Box previously had overflow-auto + h-full, making it its own scroll container. This meant: - scrollbarGutter: stable on canvasContainerRef had no effect (it had no scrollbar) - The floating zoom control (floated right in canvasContainerRef) overlapped PdfCanvas's scrollbar sitting at the same right edge - handleFitToWidth measured canvasContainerRef.clientWidth which didn't account for PdfCanvas's scrollbar, computing a zoom slightly too large and triggering a horizontal scrollbar Removing overflow-auto and h-full from PdfCanvas's root Box lets PdfCanvas grow naturally to its content height. canvasContainerRef (overflow: auto, scrollbarGutter: stable) now owns the single scroll context, so: - The gutter is always reserved; floating control mr keeps consistent clearance - clientWidth correctly reflects available page width for fit-to-width math - scrollToPage uses scrollIntoView which finds canvasContainerRef as the scroll ancestor and works unchanged

Todas as alterações

Como o que vês no transporte?

Cada uma dessas atualizações pousa automaticamente em seu espaço de trabalho. Comece grátis e veja crescer semana após semana.

Começar Livre Para SempreVer Preços