GraphiteEditor / GraphiteEditor/Graphite

Canvas doesn't rerender on moving left by text field

Đang mở
#4,393 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
27.2k
Fork
1.3k
Merge trung bình
20 giờ 5 phút
Pull request đã merge (30 ngày)
57

Mô tả

## 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with the Text Tool (T) flow and the canvas behavior when a text field grows beyond the visible artboard and shifts left. Use the debug messages to compare this automatic movement with scrollbar or mouse movement, especially whether a Send Layout/Redraw request is emitted. Done means the underlying canvas is redrawn instead of showing the grey background.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
computer-graphics, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.