remove abstain
This commit is contained in:
parent
3aa899bf90
commit
f75a89ac2d
@ -179,7 +179,7 @@
|
|||||||
v-b-tooltip.hover
|
v-b-tooltip.hover
|
||||||
title="Threshold"
|
title="Threshold"
|
||||||
class="box overlay"
|
class="box overlay"
|
||||||
:style="`left:${scaleWidth(prop.tally)}%;`"
|
:style="`left:${scaleWidth(prop)}%;`"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="tallyParam"
|
v-if="tallyParam"
|
||||||
@ -655,9 +655,9 @@ export default {
|
|||||||
}
|
}
|
||||||
return 'be rejected'
|
return 'be rejected'
|
||||||
},
|
},
|
||||||
scaleWidth() {
|
scaleWidth(p) {
|
||||||
if (this.tallyParam) {
|
if (this.tallyParam) {
|
||||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||||
}
|
}
|
||||||
return 50
|
return 50
|
||||||
},
|
},
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="tallyParam"
|
v-if="tallyParam"
|
||||||
|
title="Threshold"
|
||||||
class="box overlay"
|
class="box overlay"
|
||||||
:style="`left:${scaleWidth(proposal)}%;`"
|
:style="`left:${scaleWidth(proposal)}%;`"
|
||||||
/>
|
/>
|
||||||
@ -410,9 +411,10 @@ export default {
|
|||||||
scaleWidth(p) {
|
scaleWidth(p) {
|
||||||
if (this.tallyParam) {
|
if (this.tallyParam) {
|
||||||
if (p.status === 2) {
|
if (p.status === 2) {
|
||||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||||
}
|
}
|
||||||
return Number(this.tallyParam.threshold) * 100
|
console.log(p.tally, Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100)
|
||||||
|
return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||||
}
|
}
|
||||||
return 50
|
return 50
|
||||||
},
|
},
|
||||||
|
@ -219,9 +219,9 @@ export default {
|
|||||||
scaleWidth(p) {
|
scaleWidth(p) {
|
||||||
if (this.tallyParam) {
|
if (this.tallyParam) {
|
||||||
if (p.status === 2) {
|
if (p.status === 2) {
|
||||||
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * 100
|
return Number(this.tallyParam.quorum) * Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||||
}
|
}
|
||||||
return Number(this.tallyParam.threshold) * 100
|
return Number(this.tallyParam.threshold) * (1 - p.tally.abstain) * 100
|
||||||
}
|
}
|
||||||
return 50
|
return 50
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user