ArthurHub / ArthurHub/HTML-Renderer
Location not working for negative values, gets pushed to 0
- 主要言語
- C#
- スター
- 1.4k
- フォーク
- 550
- 平均マージ
- 14日 9時間
- マージ済み PR(30日)
- 1
説明
Hi, I am trialling this and so far it's awesome. Just found one thing though trying to render HTML into a custom List Box and sometimes (for items at the top) painting needs to start at a location with a -Y for a partially drawn list item. I believe that I have found the problem and here is my fix, so far it seems OK (the Demo still looks all good).
In Layout cells there are some calls to Math.Max where the 2nd param is 0, it should be the existing Location value.
private void LayoutCells(RGraphics g)
{
double startx = Math.Max(_tableBox.ClientLeft + GetHorizontalSpacing(), _tableBox.Location.X);
double starty = Math.Max(_tableBox.ClientTop + GetVerticalSpacing(), _tableBox.Location.Y);
....
}
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Locate the LayoutCells method in the C# source and inspect the Math.Max calls that currently compare against 0. Reproduce rendering with a partially drawn item whose Y location is negative, then verify the layout and existing Demo still render correctly after preserving the table box location.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100