From 16b87380d80dac62c2f2fe9d96b4d291c66c8c9d Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Wed, 10 Aug 2022 10:16:57 +0200 Subject: [PATCH] Use Variables for spaces between objects --- client/src/components/circle/LearningPathDiagram.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/client/src/components/circle/LearningPathDiagram.vue b/client/src/components/circle/LearningPathDiagram.vue index 16982501..db2d1e23 100644 --- a/client/src/components/circle/LearningPathDiagram.vue +++ b/client/src/components/circle/LearningPathDiagram.vue @@ -51,7 +51,7 @@ export default { type: Number, }, vertical: { - default: true, + default: false, type: Boolean } }, @@ -172,12 +172,12 @@ export default { .text((d) => d.title) .attr('class', 'circlesText text-xl font-bold hidden lg:block') - const topicHeigtOffset = 20 + const topicHeightOffset = 20 const topicHeight = 35 const circleHeigth = circleWidth + 20 function getTopicPosition(i, d, topics) { - let pos = topicHeigtOffset + let pos = topicHeightOffset for (let index = 0; index < i; index++) { let topic = topics[index] @@ -186,12 +186,11 @@ export default { } pos += circleHeigth * topic.circles.length } - return pos + 20 + return pos + topicHeightOffset } - function getCircleVerticalPostion(i, d, topics) { - let y = circleHeigth / 2 + topicHeigtOffset + let y = circleHeigth / 2 + topicHeightOffset + 10 for (let topic_index = 0; topic_index < topics.length; topic_index++) { const topic = topics[topic_index] console.log(topic.title)