Skip to content

Let mouse wheel zoom snap to view resolution levels - #7210

Open
solth wants to merge 1 commit into
kitodo:mainfrom
effective-webwork:mouse-wheel-zoom-steps-fix-4244
Open

Let mouse wheel zoom snap to view resolution levels#7210
solth wants to merge 1 commit into
kitodo:mainfrom
effective-webwork:mouse-wheel-zoom-steps-fix-4244

Conversation

@solth

@solth solth commented Aug 27, 2026

Copy link
Copy Markdown
Member

Fixes #4244 by using option constrainResolution to link mouse wheel "steps" to zoom levels in OpenLayer map of gallery detail view.

Note: I will open backports of this fix for Kitodo 3.9.x and 4.0.x once this pull request is approved

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@solth
solth requested a review from oliver-stoehr August 27, 2026 09:12
@solth
solth force-pushed the mouse-wheel-zoom-steps-fix-4244 branch 3 times, most recently from 66c7420 to b5c8c5d Compare August 31, 2026 09:30
Comment on lines 356 to +362
zoomFactor: 1.1,
extent,
constrainOnlyCenter: true,
smoothExtentConstraint: true,
showFullExtent: true,
padding: [20, 20, 20, 20]
padding: [20, 20, 20, 20],
constrainResolution: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and did not notice a real difference with regard to the necessary mouse scrolls. Setting zoomFactor to 1.3 had more effect on the aspects @matthias-ronge seems to talk about in the issue.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and did not notice a real difference with regard to the necessary mouse scrolls. Setting zoomFactor to 1.3 had more effect on the aspects @matthias-ronge seems to talk about in the issue.

Really? That's interesting - and exactly the opposite of what I have observed!

Zooming 10 "ticks" in the current main branch looks like this:

issue-4244-main.mov

Zooming 10 "ticks" with zoomFactor: 1.3:

issue-4244-zoom-factor-1-3.mov

Zooming 10 "ticks" with constrainResolution: true:

issue-4244-constrain-resolution.mov

I am using Firefox, version 154 on MacOS 26.6.3 (Tahoe), btw.

@BartChris maybe have to reload your browsers cache to see the real difference with using contrainResolution?

@solth
solth force-pushed the mouse-wheel-zoom-steps-fix-4244 branch 2 times, most recently from 7dbe816 to 752a0fe Compare September 10, 2026 10:26
@solth
solth force-pushed the mouse-wheel-zoom-steps-fix-4244 branch from 752a0fe to e56d750 Compare September 10, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mousewheel zoom steps to small

2 participants