fix(ui): align branch lane ends and route the unmatched switch path down its own lane
This commit is contained in:
1 parent
0d6d5e7dd3
commit
168ddde0dd
4 files changed
+32
-28
No files matched your search
@@ -3,14 +3,14 @@ import { Handle, Position } from "@vue-flow/core";
|
||||
|
||||
import AddStepMenu from "./AddStepMenu.vue";
|
||||
|
||||
defineProps<{ data: { branch?: string; types: string[]; editable: boolean; onInsert: (type: string) => void } }>();
|
||||
defineProps<{ data: { branch?: string; lane?: string; insertAfter?: unknown; types: string[]; editable: boolean; onInsert: (type: string) => void } }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative flex w-8 justify-center">
|
||||
<Handle type="target" :position="Position.Top" class="!opacity-0" />
|
||||
<AddStepMenu v-if="data.editable" :types="data.types" :label="data.branch ? `Add a step to ${data.branch}` : 'Add a step at the end'" @pick="data.onInsert" />
|
||||
<Handle v-if="data.branch" type="source" :position="Position.Bottom" class="!opacity-0" />
|
||||
<AddStepMenu v-if="data.editable && data.insertAfter" :types="data.types" :label="data.branch ? `Add a step to ${data.branch}` : 'Add a step at the end'" @pick="data.onInsert" />
|
||||
<Handle v-if="data.lane" type="source" :position="Position.Bottom" class="!opacity-0" />
|
||||
<span v-else class="size-2 rounded-full bg-border" aria-hidden="true" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user