Skip to content

Fix/issue 5088 carousel fractional row#5190

Open
biubiukam wants to merge 2 commits into
VisActor:developfrom
biubiukam:fix/issue-5088-carousel-fractional-row
Open

Fix/issue 5088 carousel fractional row#5190
biubiukam wants to merge 2 commits into
VisActor:developfrom
biubiukam:fix/issue-5088-carousel-fractional-row

Conversation

@biubiukam

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • New feature
  • Bug fix
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Update dependency
  • Code style optimization
  • Test Case
  • Branch merge
  • Site / documentation update
  • Demo update
  • Workflow
  • Chore
  • Release
  • Other (about what?)

🔗 Related issue link

fix #5088

💡 Background and solution

When TableCarouselAnimationPlugin uses a fractional row step such as rowCount: 1.5, the animated scroll target should preserve the fractional row offset. However, scrollToRow rounded the target row down before starting the animation, and the post-animation correction also snapped the final scroll position back to an integer row. This caused fractional carousel scrolling to behave incorrectly.

This change keeps fractional row targets for animated scrollToRow calls and only applies the post-animation integer correction when the requested row is already an integer. Non-animated scrollToRow calls still align to an integer row.

A regression test was added for scrollToRow(1.5, animationOption) to ensure the fractional target is passed to the animation manager without scheduling an integer snap-back.

📝 Changelog

Language Changelog
🇺🇸 English Fix animated fractional row scrolling snapping back to integer rows.
🇨🇳 Chinese 修复带动画的小数行滚动会被强制对齐到整数行的问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

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.

[Bug] 滚动行数为1.5,效果不符合预期

1 participant