ArthurHub / ArthurHub/HTML-Renderer

Location not working for negative values, gets pushed to 0

Aberta
#44 1 comentário 0 reações 0 responsáveis Ver no GitHub
bug enhancement
Linguagem predominante
C#
Estrelas
1.4k
Forks
550
Merge médio
14d 9h
PRs com merge (30d)
1

Descrição

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);
....
}

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Localize o método LayoutCells no código-fonte C# e inspecione as chamadas de Math.Max que atualmente fazem comparação com 0. Reproduza a renderização com um item parcialmente desenhado cuja localização Y seja negativa e, em seguida, verifique se o layout e a Demo existente continuam sendo renderizados corretamente depois de preservar a localização da caixa da tabela.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
csharp
Domínio
frontend
Tipo de issue
Bug
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.