ArthurHub / ArthurHub/HTML-Renderer

Linux/Mono image from code has the incorrect size till window resize (without styles nor "width" attribute in image tag)

Đang mở
#204 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
C#
Star
1.4k
Fork
550
Merge trung bình
14 ngày 9 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Any chance to fix?

Screenshot with issue.

![изображение](https://github.com/ArthurHub/HTML-Renderer/assets/7357924/a2f0084d-6c9e-4854-b25a-38a227356940)

If I have changed app window size the images are appeared with real size.

![изображение](https://github.com/ArthurHub/HTML-Renderer/assets/7357924/9623874d-c91d-4187-8335-cc4b1c33da1e)

PascalABC.NET code for
```pascal
procedure PABCHelpForm.contentPanel_ImageLoad(sender: Object; e: TheArtOfDev.HtmlRenderer.Core.Entities.HtmlImageLoadEventArgs);
begin
e.Handled := false;
//внешний ресурс
if(e.Src.StartsWith('http')) then Exit;

var uri := rootUri + fixUri(e.Src);

if(FileExists(uri)) then
begin
var img := Image.FromFile(uri);
//img
e.Attributes.Item['src'] := uri;
//e.Attributes.Item['width'] := IntToStr(img.Width);
//e.Attributes.Item['height'] := IntToStr(img.Height);

e.Callback(img);
e.Handled := true;
end;

end;
```

Html code for

```html

Анализ Кода Времени Разработки (Intellisense)

Keyword

1. Подсказка по
Ctrl+пробел выводит список всех доступных имен.


first screenshot


2. Подсказка по Shift+пробел выводит
список всех доступных имен из текущего модуля. Также добавился комментарий ///
который позволяет связать подсказку с элементом программы (процедура, функция,
переменная)




3. Подсказка по "точке". Если после имени
была нажата точка, то выдается список его членов.



4. Подсказка параметров функций


```

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 PascalABC.NET contentPanel_ImageLoad callback and the supplied HTML image examples, then trace the Mono image loading and initial layout path. Reproduce the issue before and after resizing the window; done means images without explicit width or height display at their real size on the first render.

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

Đánh giá

Công nghệ
csharp
Lĩnh vực
desktop, frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
32/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.