| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| openpublisher5_amd64-windows-portable.exe | 2026-09-25 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-09-25 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-09-25 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-09-25 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-09-25 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-09-25 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-09-25 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-09-25 | 176.6 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-09-25 | 185.5 MB | |
| 5.1.5_ Canvas Responsiveness, Multi-Page Overview Decoupling _ View Architecture source code.tar.gz | 2026-09-25 | 21.5 MB | |
| 5.1.5_ Canvas Responsiveness, Multi-Page Overview Decoupling _ View Architecture source code.zip | 2026-09-25 | 21.7 MB | |
| README.md | 2026-09-25 | 12.3 kB | |
| Totals: 12 Items | 1.7 GB | 0 | |
π Summary
Version 5.1.5 delivers a major architectural overhaul to Open Publisher's canvas viewport and page navigation engines, resolving the severe canvas responsiveness, layout freezing, and multi-page glitching issues reported in GitHub Issue [#4].
In previous versions, zooming out on high-resolution publications (such as 140 DPI or 300 DPI A4 documents) automatically triggered an unexpected mode switch into a multi-page grid. In that state, sidebar navigation became frozen, rulers repeated erratically across the pasteboard, floating margin guides detached into empty canvas space, and users could not easily return to single-page editing.
This release completely decouples Multi-Page Overview from viewport zoom, introduces explicit UI view toggles across the View ribbon and realigned status bar, adds an informative mode explanation modal, implements smooth keyboard and click navigation, and guarantees rock-solid coordinate validation.
Thanks to lucastucious: For reporting Issue [#4] and providing the reproduction video demonstrating the canvas unresponsiveness and viewport threshold glitching on large publications.
π Root Cause Analysis & Architecture (Issue [#4])
- Unintended Automatic Mode Switching from Viewport Zoom:
- In
canvas/canvas.js,updateMultiPageView(z)executed a dynamic threshold calculationz <= window.getMultiPageThreshold(pageDpi)(0.45 * (96 / dpi)). - For an A4 document at 140 DPI or 300 DPI, fitting the full page on screen required zooming out to approximately 21% or 19%.
- Because 19% fell below the threshold, zooming out to inspect the single page forcibly switched the entire application layout into multi-page overview mode against the user's intent.
-
Furthermore,
setZoom(z)repeatedly invokedupdateMultiPageView(z), binding layout structure directly to camera scale. -
Frozen & Broken Sidebar Navigation in Multi-Page Mode:
- In
core/pages.js,renderPage()conditionally invokedupdateMultiPageView(state.zoom)wheneverzoom <= threshold. - However, clicking a page thumbnail in the sidebar updated
state.currentPageIndexwithout scrolling or re-centering the target page slot because the primary#paperelement remained rigidly anchored at slot 0. -
Clicking thumbnails caused visual flickers while the canvas remained pinned in place.
-
Missing Double-Click to Edit Transition:
- Once trapped in the multi-page grid, there was no intuitive gesture or keyboard command to open a specific page for editing.
-
Users were forced to manually zoom past the threshold to escape, which immediately altered their comfortable viewing zoom level.
-
Repeating Misaligned Canvas Rulers Across Multiple Sheets:
- The canvas horizontal (
#ruler-h) and vertical (#ruler-v) rulers were designed strictly for a single active#paperorigin(0, 0). -
When Multi-Page Overview tiled multiple pages horizontally across hundreds of pixels, the rulers remained visible on screen, repeating tick marks and displaying coordinates that did not match the offset pages.
-
Detached Floating Green Margin Guides:
- The floating
#margin-guide-overlayexecuted on a continuousrequestAnimationFrameloop, tracking the bounding rect of#paper. -
In multi-page mode,
#paperwas either hidden or repositioned, causing the green dotted margin overlay to render adrift in empty pasteboard space between tiled page previews. -
Coordinate Overflow on Batch Imports & Deserialization:
- In
extensions/smart-images.js(importBatchOnCurrentPage), dropped images and batch-imported assets were positioned without boundary clamping. - When dropping pictures near the bottom-right corner of high-DPI canvases, elements landed at extreme pixel offsets outside page bounds.
- Newly created batch pages in
importBatchOnNewPagesdefaulted to 96 DPI rather than inheriting the active publication's DPI and measurement units.
π οΈ Enhancements & Fixes
1. Decoupled Multi-Page Overview from Viewport Zoom (canvas/canvas.js)
- Completely eliminated automatic threshold triggers from
setZoom(z). - Users can zoom freely from 2% to 300% in single-page mode without ever triggering a mode switch.
- Introduced explicit view state management via
state.viewMode = 'single' | 'multipage'. - Zooming in Single-Page mode scales
#papersmoothly via CSS transform matrix. - Zooming in Multi-Page Overview mode scales
#multi-page-wrappercleanly fromtop left, keeping all page previews perfectly aligned. - Exposed global view management APIs:
window.setViewMode(mode): switches between Single-Page and Multi-Page modes.window.toggleMultiPageView(): toggles between view modes.window.updateViewModeUI(): synchronizes all ribbon and status bar buttons.
2. Realigned Status Bar View Controls & Ribbon Integration (index.html, style.css)
- Realigned the status bar quick view switcher buttons (
#status-view-singleand#status-view-multi) directly inside the center status group:Page 1 of X | 96 DPI | [Single] [Multi] - Places page count, document resolution, and view mode together in one logical cluster, leaving the zoom percentage slider exclusively on the right:
- [====O====] + 60% - Added a dedicated Views group to the View ribbon tab with active tool state styling.
- Added
Multi-Page Overviewtoggle to the workspace canvas right-click context menu (ui/menus.js). - Styled
.status-view-btnwith matching hover, focus, and active states consistent with Open Publisher's teal theme.
3. Multi-Page Overview Informational Modal Dialog (canvas/canvas.js, style.css)
- Entering Multi-Page Overview triggers an informative on-theme modal dialog (
window.showMultiPageIntroModal): - Functions & Controls: Explains single-click to select and center, double-click or Enter to open for editing, Arrow keys to cycle, and zoom/pan tools.
- Mode Restrictions & Rulers: Clearly explains why horizontal and vertical rulers as well as margin guides are temporarily hidden: multiple pages tile across differing coordinate positions, so single-origin rulers and guides are suppressed to prevent misleading coordinates. They automatically restore when returning to Single-Page mode.
- Persistence: Includes a "Do not show this notice again" checkbox persisted in
localStorage.getItem('op_hide_multipage_intro'). - Updated
DialogSystem.showpatch inextensions/ui-interactions.jsto preserveconfirmTextandonApplyarguments.
4. Smooth Sidebar & Grid Navigation in Multi-Page Mode (core/pages.js, canvas/canvas.js)
- Single-clicking any thumbnail in the sidebar or any page slot in the overview grid:
- Updates
state.currentPageIndex. - Applies a high-visibility teal outline (
.multi-page-slot-active). - Updates the slot label:
Page X (Selected - Double-click to Edit). - Smoothly centers the target page slot in the viewport (
window.highlightAndCenterMultiPageSlot(i)). - Double-clicking any thumbnail or grid slot immediately invokes
window.openPageInSingleMode(i): - Saves current page state.
- Exits overview mode and enters Single-Page mode.
- Automatically invokes
fitToPage()to display the selected page at optimal zoom.
5. Keyboard Navigation & Accessibility (core/keyboard.js)
- When Multi-Page Overview is active:
- ArrowRight / ArrowDown: Moves selection to the next page and centers it in view.
- ArrowLeft / ArrowUp: Moves selection to the previous page and centers it in view.
- Enter: Opens the currently selected page in Single-Page editing mode.
- Escape: Returns to Single-Page editing mode on the current page.
6. Scoped Canvas Rulers & Margin Overlay Suppression (canvas/canvas.js, style.css)
- In multi-page mode,
#canvas-areagains the.multi-page-canvasCSS class: - Rulers (
#ruler-h,#ruler-v,.ruler-c) are cleanly hidden (display: none !important;). #viewportexpands togrid-column: 1 / -1; grid-row: 1 / -1; width: 100%; height: 100%;.- Floating margin guide overlay (
#margin-guide-overlay) is explicitly hidden during overview mode insyncMarginGuideOverlay(). - Returning to Single-Page mode instantly restores ruler positions, measurements, and margin guide sync.
7. Coordinate Clamping & DPI Inheritance (extensions/smart-images.js, io/publisher-file-loader.js)
- In
extensions/smart-images.js(importBatchOnCurrentPage), element positions are strictly clamped:posX = Math.max(minMargin, Math.min(maxX, posX))posY = Math.max(minMargin, Math.min(maxY, posY))Preventing elements from landing off-page. - In
importBatchOnNewPages, newly generated pages inherit the active document'sdpiand measurementunit. - In
io/publisher-file-loader.js, document loading sanitizes negative coordinates and resets view mode to single-page on load.
π§ͺ Verification & Testing
All automated Playwright test assertions passed cleanly (scratch/test_issue4_fix.py):
- Status Bar Alignment:
#status-view-modesverified inside#status-center-grouppreceded by#view-status-divider: PASS. - Page Creation: Multi-page document created with 4 pages: PASS.
- Low Zoom Decoupling: Zooming to 21%, 15%, 8%, and 5% remains strictly in single-page mode (
viewMode: single,multiActive: false, paper visible, rulers active): PASS. - Fit to Page:
fitToPage()calculated scale without triggering multi-page mode: PASS. - Multi-Page Modal Dialog: Explanatory dialog displays title, controls, ruler explanations, and confirm button: PASS.
- Sidebar Navigation: Single-clicking thumbnail 2 highlighted slot 2 and centered the slot in the viewport: PASS.
- Double-Click Slot: Double-clicking slot 1 in multi-page grid exited to single-page editing on page 1: PASS.
- Keyboard Shortcuts: Arrow navigation and Enter key editing: PASS.
- Status Bar Click Toggle: Toggling between single and multi-page modes via status bar buttons: PASS.
β Checklist Completed
- [x]
canvas/canvas.js: Decoupled multi-page view fromsetZoom; introducedsetViewMode,toggleMultiPageView,updateViewModeUI,selectMultiPageSlot,highlightAndCenterMultiPageSlot,openPageInSingleMode, andshowMultiPageIntroModal. - [x]
core/core.js: InitializedviewMode: 'single'in default applicationstate. - [x]
core/pages.js: GuardedupdateMultiPageViewinsiderenderPagewithstate.viewMode === 'multipage'; added single-click slot centering and double-click to edit on sidebar thumbnails. - [x]
core/keyboard.js: Implemented Arrow navigation, Enter (open), and Escape (exit) keyboard handlers for multi-page mode. - [x]
index.html: Realigned status bar view buttons into#status-center-groupalongside DPI badge; added Views group in View ribbon tab; updated script cachebusters to?v=5.1.5. - [x]
style.css: Configured.canvas-area.multi-page-canvaslayout overrides; added.status-view-btnstyling; added Multi-Page modal dialog styles with dark mode support. - [x]
extensions/ui-interactions.js: PatchedDialogSystem.showto preserveconfirmTextandonApplyparameters. - [x]
extensions/smart-images.js: Clamped element drop coordinates to paper bounds; inheriteddpianduniton new batch pages. - [x]
io/publisher-file-loader.js: Sanitized extreme negative coordinates on load; reset view mode to single-page on load. - [x]
ui/menus.js: Added Multi-Page Overview toggle to context menu.
π Version 5.1.5 - Open Publisher