feat(editor): 添加界面自动对齐,吸附屏幕/组件边缘并绘制引导线 - #177
Merged
Merged
Conversation
Serendisand
commented
Aug 5, 2026
Contributor
- 拖动时吸附屏幕中心线与四边,以及目标组件的左/中/右、上/中/下边缘
- 被吸附的候选边缘绘制高亮引导线,盒子边缘绘制半透明引导线
- 垂直/水平重叠范围内绘制候选组件上下/左右两条线辅助对齐
- RESIZE 模式下仅显示引导线不吸附;CT 组件不参与横向吸附
- 吸附前校验位置公式可表达且落在 move() 拖拽范围内,避免回跳与鼠标偏移漂移
- 修复 move() 远锚点公式未使用缩放后尺寸导致的 scale!=1 时拖动偏移
- 经三个子代理审查(数学正确性/集成生命周期/代码规范)后修订
- 拖动时吸附屏幕中心线与四边,以及目标组件的左/中/右、上/中/下边缘 - 被吸附的候选边缘绘制高亮引导线,盒子边缘绘制半透明引导线 - 垂直/水平重叠范围内绘制候选组件上下/左右两条线辅助对齐 - RESIZE 模式下仅显示引导线不吸附;CT 组件不参与横向吸附 - 吸附前校验位置公式可表达且落在 move() 拖拽范围内,避免回跳与鼠标偏移漂移 - 修复 move() 远锚点公式未使用缩放后尺寸导致的 scale!=1 时拖动偏移 - 经三个子代理审查(数学正确性/集成生命周期/代码规范)后修订
Serendisand
marked this pull request as draft
August 5, 2026 04:08
- 屏幕候选仅保留中心,去掉四边吸附,默认只显示十字两条 - 与其他组件对齐时只在该组件匹配边画一条细线(原画两条边+中心) - 移除 snap 的鼠标偏移补偿:原逻辑在吸附半径内吸收慢速鼠标移动,导致组件被钉死无法拖走 - 引导线按颜色分批绘制,减少每帧 GL 状态切换
- TextRenderer.widths 改为 1024 上限的 LRU,消除随会话增长的无界堆泄漏 - EntityCulling 在世界切换时重置在途遮挡查询,释放死实体强引用并回收查询 ID - KawaseBlur/KawaseBloom 在 iterations<=0 时提前返回,修复 framebufferList.get(1) 越界崩溃 - KawaseBlur 窗口尺寸变化时重建 FBO,并增加迭代次数上限防 GPU 内存耗尽
Serendisand
marked this pull request as ready for review
August 5, 2026 10:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.