Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,19 @@ already had one and both write the same preference; the other two never get one.
`PageView` sets `useWideViewPort` and `loadWithOverviewMode`, so a page wider than the screen
opens scaled down to fit and is scaled again every time the phone is turned.

How far it may scale down is the page's to say, not ours. A browser floors the page scale at
0.25, which cannot fit content more than four screens wide, so an A0 pdf page used to scroll
sideways and refuse to zoom out - measured in the WebView at 3232 css px on a 412 px screen,
pinned at 0.25. Since core 7.2.0 the meta states the floor such a page needs, and narrower
content carries none.

odrcore's `HtmlConfig.viewportWidth` writes the same fit into the page's css, for an embedder
rendering into a frame where the viewport meta tag is inert. Do not set it here: it is decided
while translating, so it freezes the fit at the width the document was opened at - measured, a
deck opened in portrait keeps a portrait-sized slide in a landscape screen. `initialZoom` and
`odr.setZoom` are for a host with a zoom control of its own; here the pinch is the WebView's.
`viewportContent` hands the whole question over, which would take the floor above with it and
give a spreadsheet a fit it does not want.

### Editability comes from the core, never from a mime type

Expand Down
5 changes: 3 additions & 2 deletions app/src/main/assets/editing-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
bridge.marksChanged(event.count);
};

// only a sheet carries the sheet editor, so this is asked of the page rather than taken for
// granted. A phone has no double click to spare, and the pointer is not asked either: a
// WebView answers that one as a mouse on an emulator
if (odr.editing && odr.editing.setSheetOptions) {
// a phone has no double click to spare, and the pointer is not asked: a
// WebView on an emulator answers that one as a mouse
odr.editing.setSheetOptions({ editOnClick: true });
}
})();
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ googleJavaFormat = "1.35.0"
ktfmt = "0.64"

# odrcore's JNI bindings, java and native in one AAR, published from OpenDocument.core
odrCore = "7.1.0"
odrCore = "7.2.0"

androidxAnnotation = "1.10.0"
androidxAppcompat = "1.8.0"
Expand Down
Loading