diff --git a/app/src/components/QuestMap.vue b/app/src/components/QuestMap.vue index b821e5f..680743d 100644 --- a/app/src/components/QuestMap.vue +++ b/app/src/components/QuestMap.vue @@ -13,10 +13,10 @@ const toast = useToast() const svgWidth = ref(window.innerWidth) const svgHeight = ref(window.innerHeight) -const marginX = 100 -const marginY = 100 +const marginX = 120 +const marginY = 120 -const nodeWidth = 150 +const nodeWidth = 160 const nodeHeight = 50 type Node = { @@ -127,6 +127,20 @@ const curvedPath = computed(() => { return `M${source.x},${source.y}A${dr},${dr} 0 0,${sweep} ${target.x},${target.y}` } }) + +const nodeStyle = computed(() => { + return (node: Node) => { + if (node.completed) return 'completed' + if (node.unlocked) return 'unlocked' + return 'locked' + } +}) + +const edgeStyle = computed(() => { + return (edge: Edge) => { + return edge.target.unlocked ? 'unlocked' : 'locked' + } +})