Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.1.5
Name Modified Size InfoDownloads / 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])

  1. Unintended Automatic Mode Switching from Viewport Zoom:
  2. In canvas/canvas.js, updateMultiPageView(z) executed a dynamic threshold calculation z <= window.getMultiPageThreshold(pageDpi) (0.45 * (96 / dpi)).
  3. For an A4 document at 140 DPI or 300 DPI, fitting the full page on screen required zooming out to approximately 21% or 19%.
  4. 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.
  5. Furthermore, setZoom(z) repeatedly invoked updateMultiPageView(z), binding layout structure directly to camera scale.

  6. Frozen & Broken Sidebar Navigation in Multi-Page Mode:

  7. In core/pages.js, renderPage() conditionally invoked updateMultiPageView(state.zoom) whenever zoom <= threshold.
  8. However, clicking a page thumbnail in the sidebar updated state.currentPageIndex without scrolling or re-centering the target page slot because the primary #paper element remained rigidly anchored at slot 0.
  9. Clicking thumbnails caused visual flickers while the canvas remained pinned in place.

  10. Missing Double-Click to Edit Transition:

  11. Once trapped in the multi-page grid, there was no intuitive gesture or keyboard command to open a specific page for editing.
  12. Users were forced to manually zoom past the threshold to escape, which immediately altered their comfortable viewing zoom level.

  13. Repeating Misaligned Canvas Rulers Across Multiple Sheets:

  14. The canvas horizontal (#ruler-h) and vertical (#ruler-v) rulers were designed strictly for a single active #paper origin (0, 0).
  15. 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.

  16. Detached Floating Green Margin Guides:

  17. The floating #margin-guide-overlay executed on a continuous requestAnimationFrame loop, tracking the bounding rect of #paper.
  18. In multi-page mode, #paper was either hidden or repositioned, causing the green dotted margin overlay to render adrift in empty pasteboard space between tiled page previews.

  19. Coordinate Overflow on Batch Imports & Deserialization:

  20. In extensions/smart-images.js (importBatchOnCurrentPage), dropped images and batch-imported assets were positioned without boundary clamping.
  21. When dropping pictures near the bottom-right corner of high-DPI canvases, elements landed at extreme pixel offsets outside page bounds.
  22. Newly created batch pages in importBatchOnNewPages defaulted 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 #paper smoothly via CSS transform matrix.
  • Zooming in Multi-Page Overview mode scales #multi-page-wrapper cleanly from top 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-single and #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 Overview toggle to the workspace canvas right-click context menu (ui/menus.js).
  • Styled .status-view-btn with 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.show patch in extensions/ui-interactions.js to preserve confirmText and onApply arguments.

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-area gains the .multi-page-canvas CSS class:
  • Rulers (#ruler-h, #ruler-v, .ruler-c) are cleanly hidden (display: none !important;).
  • #viewport expands to grid-column: 1 / -1; grid-row: 1 / -1; width: 100%; height: 100%;.
  • Floating margin guide overlay (#margin-guide-overlay) is explicitly hidden during overview mode in syncMarginGuideOverlay().
  • 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's dpi and measurement unit.
  • 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):

  1. Status Bar Alignment: #status-view-modes verified inside #status-center-group preceded by #view-status-divider: PASS.
  2. Page Creation: Multi-page document created with 4 pages: PASS.
  3. 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.
  4. Fit to Page: fitToPage() calculated scale without triggering multi-page mode: PASS.
  5. Multi-Page Modal Dialog: Explanatory dialog displays title, controls, ruler explanations, and confirm button: PASS.
  6. Sidebar Navigation: Single-clicking thumbnail 2 highlighted slot 2 and centered the slot in the viewport: PASS.
  7. Double-Click Slot: Double-clicking slot 1 in multi-page grid exited to single-page editing on page 1: PASS.
  8. Keyboard Shortcuts: Arrow navigation and Enter key editing: PASS.
  9. 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 from setZoom; introduced setViewMode, toggleMultiPageView, updateViewModeUI, selectMultiPageSlot, highlightAndCenterMultiPageSlot, openPageInSingleMode, and showMultiPageIntroModal.
  • [x] core/core.js: Initialized viewMode: 'single' in default application state.
  • [x] core/pages.js: Guarded updateMultiPageView inside renderPage with state.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-group alongside 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-canvas layout overrides; added .status-view-btn styling; added Multi-Page modal dialog styles with dark mode support.
  • [x] extensions/ui-interactions.js: Patched DialogSystem.show to preserve confirmText and onApply parameters.
  • [x] extensions/smart-images.js: Clamped element drop coordinates to paper bounds; inherited dpi and unit on 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.

image image

πŸŽ‰ Version 5.1.5 - Open Publisher

Source: README.md, updated 2026-09-25