ArthurHub / ArthurHub/HTML-Renderer
Location not working for negative values, gets pushed to 0
- Vorherrschende Sprache
- C#
- Sterne
- 1.4k
- Forks
- 550
- Ø Merge
- 14 T. 9 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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);
....
}
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100