Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/pdf-server/src/mcp-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3340,13 +3340,13 @@ function zoomIn() {
renderPage().then(scrollSelectionIntoView);
}

async function zoomOut() {
function zoomOut() {
userHasZoomed = true;
// Fullscreen floor is fit-to-page (anything smaller is dead margin).
const fit =
currentDisplayMode === "fullscreen" ? await computeFitScale() : null;
const floor = fit !== null ? Math.max(ZOOM_MIN, fit) : ZOOM_MIN;
scale = Math.max(scale - 0.25, floor);
// Intentionally NOT floored at fit-to-page (unlike pinch). Hosts may
// overlay UI on the iframe without reporting it in safeAreaInsets, so
// "fit" can leave the page bottom hidden; the button is the escape hatch
// to shrink past it. Pinch still rubber-bands at fit (see commitPinch).
scale = Math.max(scale - 0.25, ZOOM_MIN);
renderPage().then(scrollSelectionIntoView);
}

Expand Down
Loading