Minor improvements for feature handling with radio buttons
parent
12636365fc
commit
b1516998f1
|
@ -152,17 +152,17 @@ Features.prototype.updateData = function (featureElement) {
|
|||
var group = featureElement.attr('name');
|
||||
var controlElements = $('input[name="' + group + '"]');
|
||||
var selectedBit = controlElements.filter(':checked').val();
|
||||
var thisFeature = this;
|
||||
var featureMask = this._featureMask;
|
||||
controlElements.each(function() {
|
||||
var bit = $(this).val();
|
||||
if (selectedBit === bit) {
|
||||
thisFeature._featureMask = bit_set(thisFeature._featureMask, bit);
|
||||
featureMask = bit_set(featureMask, bit);
|
||||
} else {
|
||||
thisFeature._featureMask = bit_clear(thisFeature._featureMask, bit);
|
||||
featureMask = bit_clear(featureMask, bit);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this._featureMask = featureMask;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue