Factor out common variable in ol.dom.Input

This commit is contained in:
Tom Payne
2014-01-29 20:35:05 +01:00
parent 97cabd273a
commit ae5f5ee96d

View File

@@ -116,10 +116,11 @@ goog.exportProperty(
* @private
*/
ol.dom.Input.prototype.handleInputChanged_ = function() {
if (this.target_.type === 'checkbox' || this.target_.type === 'radio') {
this.setChecked(this.target_.checked);
var target = this.target_;
if (target.type === 'checkbox' || target.type === 'radio') {
this.setChecked(target.checked);
} else {
this.setValue(this.target_.value);
this.setValue(target.value);
}
};