fix: hover rect is frozen when scroll canvas#1235
Conversation
WalkthroughThe changes update element hover management within the canvas container. An Changes
Sequence Diagram(s)sequenceDiagram
participant C as Container
participant R as refreshSelectionState
participant U as updateHoverRect
participant E as Element
C->>R: refreshSelectionState()
C->>U: updateHoverRect()
U->>E: Retrieve element by provided/current hover ID
E-->>U: Return element dimensions & position
U-->>C: Update hover state with element details and id
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
滚动画布时,hover框不会随着元素位置变动更新
Issue Number: #1227
What is the new behavior?
滚动画布时,hover框会随着元素位置变动更新。需要注意的是,鼠标只有滚轮滚动时,不会触发mouse hover事件。所以滚动页面时,并不会hover新的元素,而是会随着之前hover的元素位置变动更新
Does this PR introduce a breaking change?
Other information