Skip to content

Commit efa9a91

Browse files
committed
fix(content): node transparent alignment
1 parent ee324e3 commit efa9a91

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/NodeTransparent.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
const checkTargetHandle = (ty) => {
1414
return Object.values(props.data.targetPosition || {}).includes(ty)
1515
}
16+
17+
const alignmentClass = computed(() => 'text-' + (props.data.align || 'left'))
1618
</script>
1719

1820
<template>
@@ -26,7 +28,7 @@
2628
<Handle v-if="checkTargetHandle('left')" type="target" :position="Position.Left" />
2729
<Handle v-if="checkTargetHandle('bottom')" type="target" :position="Position.Bottom" />
2830

29-
<div class="py-1 px-2">
31+
<div :class="['py-1 px-2', alignmentClass]">
3032
{{ props.label }}
3133
</div>
3234
</template>

components/Roadmap.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
1212
const roadmapNodes = ref([
1313
{ id: 'topics', type: 'topics', position: { x: 0, y: -150 }, data: { topicLevel: 'start' } },
14-
...data.value.map(({ title, _path, data: { position, width, sourcePosition, targetPosition, topicLevel, type } }) => (
15-
{ id: _path.substring(1).replaceAll('/', "-").replaceAll('_', ''), type, position, width, label: title, data: { topicLevel, sourcePosition, targetPosition } }
14+
...data.value.map(({ title, _path, data: { position, width, sourcePosition, targetPosition, topicLevel, type, align } }) => (
15+
{ id: _path.substring(1).replaceAll('/', "-").replaceAll('_', ''), type, position, width, label: title, data: { align, topicLevel, sourcePosition, targetPosition } }
1616
))
1717
])
1818

0 commit comments

Comments
 (0)