fix: optimize canvas options location caculate algorithm#1572
fix: optimize canvas options location caculate algorithm#1572hexqi merged 5 commits intoopentiny:developfrom
Conversation
|
Warning Rate limit exceeded@chilingling has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 33 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe update introduces utility functions to standardize vertical placement and alignment logic for the label and option toolbar relative to a selected canvas element. It replaces inline calculations with reusable functions that determine available space, position preference, and vertical alignment based on a placement strategy. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit