feat: dynamic arrow drawing

This commit is contained in:
efim
2023-11-21 19:21:36 +00:00
parent 183df0959c
commit 017cf465da
2 changed files with 15 additions and 6 deletions

View File

@@ -72,11 +72,11 @@
style="--tan: {{ .Tangens }}; --m: {{ .Total }};"
>
{{ with .ArrowData }}
{{ if .IsVisible }}
<svg height="{{.Height}}" width="{{.Width}}"
class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
>
<g>
<rect height="{{.Height}}" width="{{.Width}}" fill="#EEE" />
<path
d="M {{.StartX}} {{.StartY}}
A {{.Radius}} {{.Radius}} 0, {{.LargeArcFlag}}, 1, {{.EndX}} {{.EndY}}"
@@ -90,6 +90,7 @@
</g>
</svg>
{{ end }}
{{ end }}
{{ range .Persons }} {{ template "personBlocks" . }} {{ end }}
</div>
{{end}}