Skip to content

fix(structure): fit nanoscroll view after build - #296

Merged
Hello-QM merged 1 commit into
Hello-QM:mainfrom
XCai-0213:fix/nanoscroll-fit-view
Jun 9, 2026
Merged

fix(structure): fit nanoscroll view after build#296
Hello-QM merged 1 commit into
Hello-QM:mainfrom
XCai-0213:fix/nanoscroll-fit-view

Conversation

@XCai-0213

Copy link
Copy Markdown
Contributor

Summary

  • Center generated nanoscroll atoms inside the non-periodic cell so the lattice box no longer encloses an off-center scroll.
  • Refit the viewer after nanoscroll construction by resetting the camera position and orbit target.
  • Recompute orthographic zoom when the structure size changes, so newly generated large nanoscrolls are visible without manual zooming out.

Verification

  • cargo test nanoscroll --lib passed: 5 tests passed.
  • pnpm build:wasm passed.
  • git diff --check passed.
  • pnpm test was attempted but timed out after 120s with a Vitest output pipe EPIPE.
  • pnpm check was attempted; it still reports existing project-wide diagnostics: 11 errors and 303 warnings.

@Hello-QM
Hello-QM merged commit 76835a5 into Hello-QM:main Jun 9, 2026
3 checks passed
@XCai-0213
XCai-0213 deleted the fix/nanoscroll-fit-view branch June 13, 2026 13:07
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.

2 participants