feat(frontend): fix viewgraph

This commit is contained in:
Faton Ramadani
2024-08-14 13:34:41 +02:00
parent fcb3b41cd5
commit 54b3e648a1
3 changed files with 33 additions and 29 deletions
@@ -44,20 +44,22 @@
data.eventHandlers.insert(e.detail)
}}
/>
<button
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
{#if data.insertable}
<button
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-red-400 hover:text-white
hover:border-red-700"
on:click|preventDefault|stopPropagation={() => {
data.eventHandlers.deleteBranch(
{
module: data.modules.find((m) => m.id === data.id),
index: data.branchIndex
},
data.label
)
}}
>
<X size={12} />
</button>
on:click|preventDefault|stopPropagation={() => {
data.eventHandlers.deleteBranch(
{
module: data.modules.find((m) => m.id === data.id),
index: data.branchIndex
},
data.label
)
}}
>
<X size={12} />
</button>
{/if}
</NodeWrapper>
@@ -38,20 +38,22 @@
data.eventHandlers.select(data.id)
}}
/>
<button
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
{#if data.insertable}
<button
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-red-400 hover:text-white
hover:border-red-700"
on:click|preventDefault|stopPropagation={() => {
data.eventHandlers.deleteBranch(
{
module: data.modules.find((m) => m.id === data.id),
index: data.branchIndex
},
data.label
)
}}
>
<X size={12} />
</button>
on:click|preventDefault|stopPropagation={() => {
data.eventHandlers.deleteBranch(
{
module: data.modules.find((m) => m.id === data.id),
index: data.branchIndex
},
data.label
)
}}
>
<X size={12} />
</button>
{/if}
</NodeWrapper>
+1 -1
View File
@@ -8,7 +8,7 @@
: { modules: [], failureModule: undefined }
</script>
<FlowGraphV2 fullSize {modules} {failureModule} />
<FlowGraphV2 {modules} {failureModule} />
<a
download="flow.json"
href={'data:text/json;charset=utf-8,' +