Skip to content

#7038 - System doesn't scroll screen down if user moves mouse to the … - #11776

Open
PaulinaKacz wants to merge 11 commits into
masterfrom
7038-system-doesn't-scroll-screen-down-if-user-moves-mouse-to-the-bottom-of-the-screen-while-selecting-sequence-in-sequence-mode
Open

PaulinaKacz wants to merge 11 commits into
masterfrom
7038-system-doesn't-scroll-screen-down-if-user-moves-mouse-to-the-bottom-of-the-screen-while-selecting-sequence-in-sequence-mode

Conversation

@PaulinaKacz

@PaulinaKacz PaulinaKacz commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Fix: Auto-scroll during selection in Sequence mode (#7038)

Problem
When selecting elements in Sequence layout mode, moving the mouse to the edge of the canvas did not scroll the viewport, making it impossible to extend a selection beyond the visible area.

Solution
Added auto-scroll logic to SelectBase that activates only in Sequence layout mode. When the cursor is held within 15 px of any canvas edge during an active selection drag, the viewport scrolls continuously at 5 px/frame. A 150 ms
initial delay prevents accidental scrolls from fast mouse passes through the edge zone.

Changes

SelectBase.ts

  • Added handleAutoScrollDuringSelection(event) — detects proximity to canvas edges and starts/cancels a repeating scroll timer
  • Added performAutoScroll() — executes the scroll tick via zoomTool.scrollBy and reschedules itself every 5 ms
  • Added cancelAutoScroll() — clears the timer; called on tool destroy, stopMovement, and when the cursor leaves the edge zone
  • Added protected readonly autoScrollEnabled = true — opt-out hook for subclasses
  • Auto-scroll is restricted to sequence-layout-mode only; all other modes cancel it immediately

SelectLasso.ts

  • Overrides autoScrollEnabled = false to opt out of auto-scroll — free-form polygon drawing is destabilized by canvas movement, so lasso intentionally does not participate in this feature

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

Paulina_Kwapisz added 3 commits September 8, 2026 14:27
…bottom of the screen while selecting sequence in sequence mode
…-scroll-screen-down-if-user-moves-mouse-to-the-bottom-of-the-screen-while-selecting-sequence-in-sequence-mode
…-scroll-screen-down-if-user-moves-mouse-to-the-bottom-of-the-screen-while-selecting-sequence-in-sequence-mode
Paulina_Kwapisz added 8 commits September 9, 2026 12:15
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode
…bottom of the screen while selecting sequence in sequence mode - code clean up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System doesn't scroll screen down if user moves mouse to the bottom of the screen while selecting sequence in sequence mode

1 participant