diff --git a/src/components/DamageChart.vue b/src/components/DamageChart.vue index e3196d3..d913b19 100644 --- a/src/components/DamageChart.vue +++ b/src/components/DamageChart.vue @@ -1,7 +1,6 @@ @@ -21,8 +20,8 @@ export default { const store = useStore() let myChart1, myChart2 - const width = ref(window.innerWidth <= 1000 && window.innerWidth >= 751 ? window.innerWidth : 1000) - const height = ref(window.innerWidth >= 751 ? width.value * 3 / 10 : window.innerWidth >= 501 && window.innerWidth <= 751 ? width.value * 3 / 7.5 : width.value * 3 / 5) + const width = ref(window.innerWidth <= 1000 && window.innerWidth >= 751 ? window.innerWidth : 750) + const height = ref(window.innerWidth >= 751 ? width.value * 3 / 7.5 : window.innerWidth >= 501 && window.innerWidth <= 751 ? width.value * 3 / 6.5 : width.value * 3 / 5.5) const dataArr = (stats, team, prop) => { if (['team', 'enemy', 'self'].indexOf(prop) > -1) { @@ -140,16 +139,16 @@ export default { }) window.onresize = () => { - if (window.innerWidth <= 1000) { + if (window.innerWidth <= 750) { width.value = window.innerWidth - 20 if (window.innerWidth <= 500) { - height.value = width.value * 3 / 5 + height.value = width.value * 3 / 5.5 } if (window.innerWidth <= 750 && window.innerWidth >= 501) { - height.value = width.value * 3 / 7.5 + height.value = width.value * 3 / 6.5 } if (window.innerWidth <= 1000 && window.innerWidth >= 751) { - height.value = width.value * 3 / 10 + height.value = width.value * 3 / 7.5 } } @@ -161,18 +160,21 @@ export default {