mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
* fix(editor): preserve PDF zoom when file content reloads PdfViewer rebuilt the pdf.js document on every content change and always reset to page-width, so external PDF updates wiped the user's zoom. Keep a fit-width vs absolute preference across reloads for the same file path. Closes #10165 * refactor(editor): dedupe PDF zoom handlers into shared callbacks Collapse six copies of the step-scale-and-record-preference logic (three directions duplicated across the keyboard handler and toolbar callbacks) into a single stepZoom callback; the keydown handler now reuses zoomIn/ zoomOut/zoomReset so keyboard and toolbar can't drift apart. Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Co-authored-by: Orca <help@stably.ai>