adrai / adrai/flowchart.js

Horizontal centering for multi-line text

Aberta
#224 1 comentário 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
8.7k
Forks
1.2k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Hello, is it possible to adjust the horizontal centering for text spread over several lines? By default, such text is left aligned and therefore the spacing between the text and the frame is asymmetrical (unlike frames containing a single line of text), as in the capture below:

![Screenshot 2021-08-06 at 22-25-34 flowchart js](https://user-images.githubusercontent.com/19566809/128568008-fe2f6db8-7a3d-486c-affa-7888f8837aca.png)

By hand I changed the text-anchor property from start to middle and adjusted the start position in x to half the width of the frame to illustrate the rendering which I imagine is more visually pleasing:

![Screenshot 2021-08-06 at 22-24-34 flowchart js](https://user-images.githubusercontent.com/19566809/128568016-5d939e37-5c17-4443-aa25-d6a14ae455e7.png)

Is this actually possible with flowchart.js because I don't see any use of it in the examples?

Many thanks to the developers of this project that I find very useful.

Guia de contribuição

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

Direção de pesquisa

Reproduce the multi-line and single-line text cases described in the issue and compare their horizontal alignment in the rendered flowchart. Trace the text-rendering entry point and verify that multi-line text is centered within its frame while existing single-line rendering remains unchanged.

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

Avaliação

Stack de tecnologia
javascript
Domínio
frontend
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

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