diff --git a/CLAUDE.md b/CLAUDE.md index 19d3a8c3e79b..ba245a73f5aa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/app/src/main/assets/editing-bridge.js b/app/src/main/assets/editing-bridge.js index 12a652611d0b..a6ce502c5aa9 100644 --- a/app/src/main/assets/editing-bridge.js +++ b/app/src/main/assets/editing-bridge.js @@ -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 }); } })(); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bbf7a5f6838e..1478d1e0cc70 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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"