Skip to content

[ftr]: ImageViewer host wiring into a shared helper - #276

Open
hizclick wants to merge 1 commit into
image-component-integrationfrom
host-wiring-only
Open

[ftr]: ImageViewer host wiring into a shared helper#276
hizclick wants to merge 1 commit into
image-component-integrationfrom
host-wiring-only

Conversation

@hizclick

Copy link
Copy Markdown
Contributor

Description, Context and related Issue

This PR extracts duplicated ImageViewer host-side setup into the shared resources/js/ImageViewerHost.js helper.

The helper centralizes common logic used by views that host one ImageViewer, including:

  • Creating and wiring ImageViewer
  • Synchronizing viewer page changes with the page spinner
  • Creating the page spinner and zoom slider
  • Synchronizing zoom changes between the viewer and slider
  • Showing and hiding host toolbar entries
  • Fitting the displayed image to the available view

PageBasedView, FacsimileView, and TextFacsimileSplitView now use this shared setup instead of independently implementing the same behavior.

How Has This Been Tested?

Manual testing should cover:

  • Opening a source in page-based view
  • Switching between page-based and measure-based views
  • Page-spinner navigation and synchronization
  • Zoom-slider synchronization with the ImageViewer
  • Resetting the viewer with the fit-facsimile control
  • Opening a standalone facsimile view
  • Opening a text/facsimile split view
  • Confirming that MeasureBasedView still creates and manages multiple per-system viewers
  • Confirming that annotations, measures, and overlays continue to behave as before

Testing environment:

  • Browser: Chrome, Safari
  • Edition used: Edition Example, klarinettenquintett

Types of changes

  • Improvement

Overview

  • I have updated the inline documentation accordingly.
  • I have performed a self-review of my code according to the style guide.
  • I have read the CONTRIBUTING document.
  • I have manually tested the affected ImageViewer host views.
  • All relevant existing tests passed.

@github-project-automation github-project-automation Bot moved this to In Progress in Edirom Development Aug 28, 2026
@hizclick
hizclick changed the base branch from develop to image-component-integration August 28, 2026 14:50
@hizclick
hizclick requested a review from DennisFriedl August 28, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants