js/lists/radiobuttonlist/radiobuttonlist.js in rsence-2.2.4 vs js/lists/radiobuttonlist/radiobuttonlist.js in rsence-2.2.5
- old
+ new
@@ -99,11 +99,11 @@
radioButtonResponder: false,
setEnabled: function(_state){
this.base(_state);
if(!this['listItemViews']){ return; }
for(var i=0;i<this.listItems.length;i++){
- this.listItemViews[i].setEnabled(_state)
+ this.listItemViews[i].setEnabled(_state);
}
},
/** = Description
*
@@ -120,11 +120,14 @@
if(_listItems === undefined || _listItems === null){
return;
}
if(_listItems[ this.value ] !== undefined){
_value = _listItems[ this.value ];
- this.parent.setValue( _value[0] );
+ if( this.parent.value !== _value[0] ){
+ // console.log('radio button index responder:',_value[0],', parent value:',this.parent.value);
+ this.parent.setValue( _value[0] );
+ }
}
}
}),
@@ -139,11 +142,13 @@
this.radioButtonResponder = this.RadioButtonIndexResponder.nu( this );
this.radioButtonIndexValue.bind( this.radioButtonResponder );
}
for ( var i = 0; i < this.listItems.length; i++ ) {
if ( this.listItems[i][0] === _value ) {
- this.radioButtonResponder.setValue( -1 );
- this.radioButtonResponder.setValue( i );
+ if( this.radioButtonResponder.value !== i ){
+ // this.radioButtonResponder.setValue( -1 );
+ this.radioButtonResponder.setValue( i );
+ }
break;
}
}
}
}