Skip to content

3D viewer: panning and a mouse setting (#459) - #461

Merged
WARR-eV merged 4 commits into
mainfrom
fix-459-viewer-pan
Nov 22, 2026
Merged

WARR-eV merged 4 commits into
mainfrom
fix-459-viewer-pan

Conversation

@rudalabs

Copy link
Copy Markdown
Collaborator

Closes #459

The 3D viewer (shared by the web UI and the desktop app) had no panning: every one-pointer drag called rotate(), two fingers only zoomed – so no button combination could move the model sideways.

Panning

  • Right or middle drag, Shift or Ctrl + left drag, a drag with left and right held, two fingers on a touch screen (with pinch zoom), Shift + arrow keys.
  • pan() moves the point the view turns around along the screen at its depth, so the model follows the pointer; it stays within four model radii of the model's centre, so the model cannot be lost. Reset view / double-click centres it again (home keeps the centre).
  • Right and middle drags open no context menu and start no autoscroll on the canvas; only a left click picks a measure or note point.

Mouse setting (below the view, next to Measure; stored per browser/app in localStorage, teamcraft-viewer-mouse):

Setting Rotate Pan
Left drag rotates · right or middle pans (default) left right, middle
Right drag rotates · middle pans right, left middle
Middle drag rotates · Shift + middle pans middle, left Shift + middle, right
Middle drag pans · Shift + middle rotates Shift + middle, left middle, right

In every scheme, Shift/Ctrl + left drag and left + right pan – the combinations the issue tried.

Tests: dragAction() is pure and exported; scripts/viewer-input.test.mjs checks every scheme and the shared combinations (new step in the desktop workflow's ui job).

Docs: docs/src/guide/files.md (panning, the setting as a table), docs/src/guide/desktop.md, the hints of the viewer page and the desktop 3D viewer tab, CHANGELOG.

Not run locally (no Node here) – the ui job runs the new test; please try a pan with an E57 cloud once.

🤖 Generated with Claude Code

rudalabs and others added 4 commits November 22, 2026 22:30
Version 0.2.13 in Cargo.toml, desktop/Cargo.toml, desktop/tauri.conf.json
and the book's doxygen.js; both lock files follow (workspace packages
only). CHANGELOG: the Unreleased entries become 0.2.13 (2026-11-22),
compare links added. Upgrade guide: row v0.2.12 -> v0.2.13 (migration
0078, file_versions.properties). CLAUDE.md names the current version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clippy 1.100 refuses &[x.clone()] for a one-element slice
(cloned_ref_to_slice_refs); five places in the tests of
desktop/src/localchanges.rs (#416) failed the desktop jobs on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every drag only rotated. The viewer now pans: right or middle drag,
Shift or Ctrl + drag, both buttons held, two fingers, Shift + arrow
keys; Reset view centres the model again (home keeps the centre). pan()
moves the point the view turns around along the screen at its depth,
within four model radii of the model's centre.

A Mouse setting below the view picks the scheme (left/right/middle drag
rotates, Shift + middle pans or rotates), stored per browser in
localStorage; Shift/Ctrl + left and both buttons pan in every scheme.
dragAction() is pure and exported; scripts/viewer-input.test.mjs tests
every scheme (CI job ui). Right and middle drags open no context menu
and start no autoscroll; only a left click picks a measure point.

Docs: guide/files.md (pan, the setting as a table), guide/desktop.md,
the hints of the viewer page and the desktop 3D tab, CHANGELOG.

Closes #459

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WARR-eV
WARR-eV merged commit f35a131 into main Nov 22, 2026
16 of 21 checks passed
@WARR-eV
WARR-eV deleted the fix-459-viewer-pan branch November 22, 2026 22:14
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.

Bug: No Translation in 3D viewer

2 participants