Skip to content

[codex] Preserve scroll rows during drag#1003

Open
nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/preserve-scroll-rows-during-drag-794
Open

[codex] Preserve scroll rows during drag#1003
nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/preserve-scroll-rows-during-drag-794

Conversation

@nexiumbiz-debug

Copy link
Copy Markdown
Contributor

Summary

  • keep scrollVertical row count from shrinking while an item is being dragged or resized
  • still allow rows to grow during the active interaction
  • allow the grid to shrink back to the actual content height once the interaction ends
  • add component coverage for the mid-drag preserve and post-drag shrink behavior

Fixes #794.

Root cause

setGridDimensions() recalculates row count from the current item positions on every layout update. In scrollVertical, dragging an item upward can reduce the computed row count while the pointer is still inside the grid, which shrinks the grid underneath the drag and amplifies the movement.

Validation

  • npx prettier --check projects/angular-gridster2/src/lib/gridster.ts projects/angular-gridster2/src/lib/tests/gridster.spec.ts
  • npx eslint projects/angular-gridster2/src/lib/tests/gridster.spec.ts (only the pre-existing Node module-type warning)
  • npm run test-lib -- --watch=false
  • npm run build-lib
  • git diff --check (only the repo's LF/CRLF warning)

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.

Rows are being deleted automatically while scrolling up just for a little bit and I can't control that behavior inside Scroll Vertical grid type

1 participant