Use Variables for spaces between objects
This commit is contained in:
parent
c7622f7ed6
commit
16b87380d8
|
|
@ -51,7 +51,7 @@ export default {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
vertical: {
|
vertical: {
|
||||||
default: true,
|
default: false,
|
||||||
type: Boolean
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -172,12 +172,12 @@ export default {
|
||||||
.text((d) => d.title)
|
.text((d) => d.title)
|
||||||
.attr('class', 'circlesText text-xl font-bold hidden lg:block')
|
.attr('class', 'circlesText text-xl font-bold hidden lg:block')
|
||||||
|
|
||||||
const topicHeigtOffset = 20
|
const topicHeightOffset = 20
|
||||||
const topicHeight = 35
|
const topicHeight = 35
|
||||||
const circleHeigth = circleWidth + 20
|
const circleHeigth = circleWidth + 20
|
||||||
|
|
||||||
function getTopicPosition(i, d, topics) {
|
function getTopicPosition(i, d, topics) {
|
||||||
let pos = topicHeigtOffset
|
let pos = topicHeightOffset
|
||||||
|
|
||||||
for (let index = 0; index < i; index++) {
|
for (let index = 0; index < i; index++) {
|
||||||
let topic = topics[index]
|
let topic = topics[index]
|
||||||
|
|
@ -186,12 +186,11 @@ export default {
|
||||||
}
|
}
|
||||||
pos += circleHeigth * topic.circles.length
|
pos += circleHeigth * topic.circles.length
|
||||||
}
|
}
|
||||||
return pos + 20
|
return pos + topicHeightOffset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getCircleVerticalPostion(i, d, topics) {
|
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++) {
|
for (let topic_index = 0; topic_index < topics.length; topic_index++) {
|
||||||
const topic = topics[topic_index]
|
const topic = topics[topic_index]
|
||||||
console.log(topic.title)
|
console.log(topic.title)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue