diff --git a/src/components/SavingGoalComponents/SavingGoalRoadmap.vue b/src/components/SavingGoalComponents/SavingGoalRoadmap.vue index c1b4739ccd09bf8a02c469a62ac28393614b6ecc..4532527ffd38a4d8f50542bb90e6e2f4c3c05a6d 100644 --- a/src/components/SavingGoalComponents/SavingGoalRoadmap.vue +++ b/src/components/SavingGoalComponents/SavingGoalRoadmap.vue @@ -25,7 +25,16 @@ export default { }, methods: { togglePanel(step: Step) { - step.showPanel = !step.showPanel; + if (step.showPanel) { + // If the clicked panel is already open, close it + step.showPanel = false; + } else { + //Close all panels before opening new one + //Ensure only one panel open at a time + this.steps.forEach((s) => (s.showPanel = false)); + //Open clicked on panel + step.showPanel = true; + } }, }, }; @@ -96,14 +105,14 @@ export default { .timeline>li:nth-child(even) { position: relative; margin-bottom: 50px; - height: 180px; + height: 100px; right:-100px; } .timeline>li:nth-child(odd) { position: relative; margin-bottom: 50px; - height: 180px; + height: 100px; left:-100px; }