fixed progress falling behind

This commit is contained in:
thilo 2020-03-22 00:02:03 +01:00
parent ac495e06d9
commit 5c1126c105

View file

@ -1,7 +1,7 @@
<template>
<div class="questionmaire">
<div class="progress">
<div v-bind:key="n" v-for="n in $store.state.questions.length - 1" v-bind:class="getDotClass(n)"></div>
<div v-bind:key="n" v-for="n in $store.state.questions.length" v-bind:class="getDotClass(n)"></div>
</div>
<Question
v-bind:type="$store.state.questions[$store.state.currentQuestion].type"
@ -20,7 +20,7 @@
},
methods: {
getDotClass(n) {
if (n < this.$store.state.currentQuestion) {
if (n <= this.$store.state.currentQuestion) {
return "point answered"
} else {
return "point"