add blink dispaly

This commit is contained in:
2020-04-12 22:38:10 +08:00
parent 9d3d7e8aad
commit 70b876bbf2
5 changed files with 63 additions and 19 deletions

View File

@ -29,12 +29,6 @@
</div>
<div style="background: #7f7f7f; width: 100%; height: 100%; overflow: scroll; position: relative;">
<div>
<svg version="1.1" width="{{ gWidth }}px" height="{{ gHeight }}px" style="position: absolute; top: 0; left: 0;">
<line x1="502" y1="210" x2="100" y2="100" stroke="black" stroke-width="1px"></line>
<line x1="320" y1="200" x2="100" y2="100" stroke="blue" stroke-width="1px" stroke-dasharray="10, 5">
</line>
<text x="200" y="155" fill="black">0</text>
</svg>
{# blocks content #}
{% for i in blocks %}
<div class="block-body" style="height: {{ i[12] }}px; width: {{ i[11] }}px; top: {{ i[10] }}px; left: {{ i[9] }}px;">
@ -69,6 +63,22 @@
style="height: {% if i[6] == 2 or i[6] == 3 %}6{% else %}5{% endif %}px; width: {% if i[6] == 2 or i[6] == 3 %}6{% else %}15{% endif %}px; top: {{ i[5] }}px; left: {{ i[4] }}px;"
title="{{ "Name: %s\nType: %s"|format(i[2], i[3]) }}"></div>
{% endfor %}
<svg version="1.1" width="{{ gWidth }}px" height="{{ gHeight }}px" style="position: absolute; top: 0; left: 0;pointer-events: none;">
{# links content #}
{% for i in links %}
{% if i[1] == -2 %}
{# todo: finish export link #}
{% elif i[1] == -1 %}
{# todo: finish plink #}
{% else %}
<line x1="{{ i[8] }}" y1="{{ i[9] }}" x2="{{ i[10] }}" y2="{{ i[11] }}" stroke="black" stroke-width="1px"></line>
<text class="link-delay" x="{{ (i[8] + i[10]) / 2 }}" y="{{ (i[9] + i[11]) / 2 }}" fill="black">{{ i[1] }}</text>
{% endif %}
{% endfor %}
<!-- <line x1="320" y1="200" x2="100" y2="100" stroke="blue" stroke-width="1px" stroke-dasharray="10, 5">
</line>-->
</svg>
</div>
</div>