graph: text nodes are rectangles

This commit is contained in:
Vašek Šraier 2020-10-07 21:14:17 +02:00
parent cd8ec99d13
commit e383d513f8

View file

@ -83,7 +83,7 @@
fill: green; /* TODO */
}
.selected > ellipse {
.selected > ellipse, .selected > rect {
stroke-width: 4px;
stroke: red;
}
@ -111,7 +111,11 @@
{task.title == null ? task.id : task.title}
</text>
{:else}
<ellipse class="taskNode" rx={ellipse_rx} ry={20} {cx} {cy} />
{#if task.type == "text"}
<rect class="taskNode" x={cx-ellipse_rx} y={cy-20} height={40} width={2*ellipse_rx} rx={3} />
{:else}
<ellipse class="taskNode" rx={ellipse_rx} ry={20} {cx} {cy} />
{/if}
<text
bind:this={text_element}
x={cx}