GraphiteEditor / GraphiteEditor/Graphite
Canvas doesn't rerender on moving left by text field
- 主要语言
- Rust
- 星标
- 27.2k
- 派生
- 1.3k
- 平均合并
- 20 小时 5 分钟
- 30 天内合并 PR
- 57
描述
## Description
When inserting a text field, and on updating it's content, the text field occasionally moves left if its length is more and doesn't fit the currently displayed canvas, it is done so as to accommodate the cursor to see what is currently being written. In doing so, it doesn't re render the underlying canvas on the right, rather shows the grey background. Reported first on [discord](https://discordapp.com/channels/731730685944922173/881073965047636018/1467105234500194314).
## Reproduce the issue
1. Open a new document
2. Select "Text Tool (T)".
3. Start writing something near the left side in a zoomed artboard and you should see the issue.
## Possible Culprits & Solution
When moving the canvas to fit the text, the frontend doesn't call a Send Layout/Redraw request which is generally sent when moving the canvas with scrollbars or mouse (observed via the debug messages). So, possible solution would be to trigger a redraw/Layout change request when length exceeds the current length and text begins to move to the left.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 Text Tool (T) 流程以及文本字段超出可见 artboard 并向左移动时的 canvas 行为开始。使用 debug messages 将此自动移动与 scrollbar 或鼠标移动进行比较,尤其要确认是否发出了 Send Layout/Redraw 请求。当底层 canvas 被重新绘制,而不是显示灰色背景时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- computer-graphics, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 58/100