aframe-gui
aframe-gui copied to clipboard
'checked' property of a-gui-radio not updating
I can't get a-gui-radio to send me the change of value of 'checked' it always sends true
HTML
<a-gui-flex-container position="${position}" width=".1" height=".1" scale="1 1 1" rotation="${rotation}" opacity="0">
<a-gui-radio
width=".4" height=".2"
onclick="addCart(this)"
value="🛒"
font-family="Arial"
font-size=30px
margin="0 0 0.05 0"
opacity="0"
active-color="#009900"
background-color="#d3d3d3"
handle-color="#333333"
border-color="#999999"
hover-color="#AAAAAA"
extra=false
>
</a-gui-radio>
</a-gui-flex-container>
JS
function addCart(_this){
var checked = _this.getAttribute("checked");
if(checked){
var audio1 = document.querySelector('#addCartAudio');
audio1.components.sound.playSound();
}else{
var audio2 = document.querySelector('#removeCartAudio');
audio2.components.sound.playSound();
}
_this.setAttribute("checked", !_this.getAttribute("checked"));
}
@lmalave could you check if this is still an issue please