Remove goog.isDef from selectinteraction

This commit is contained in:
Marc Jansen
2015-09-23 20:14:27 +02:00
committed by Tim Schaub
parent 6c581b8eaf
commit 4b993727c8
+9 -9
View File
@@ -105,51 +105,51 @@ ol.interaction.Select = function(opt_options) {
handleEvent: ol.interaction.Select.handleEvent handleEvent: ol.interaction.Select.handleEvent
}); });
var options = goog.isDef(opt_options) ? opt_options : {}; var options = opt_options ? opt_options : {};
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.events.ConditionType}
*/ */
this.condition_ = goog.isDef(options.condition) ? this.condition_ = options.condition ?
options.condition : ol.events.condition.singleClick; options.condition : ol.events.condition.singleClick;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.events.ConditionType}
*/ */
this.addCondition_ = goog.isDef(options.addCondition) ? this.addCondition_ = options.addCondition ?
options.addCondition : ol.events.condition.never; options.addCondition : ol.events.condition.never;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.events.ConditionType}
*/ */
this.removeCondition_ = goog.isDef(options.removeCondition) ? this.removeCondition_ = options.removeCondition ?
options.removeCondition : ol.events.condition.never; options.removeCondition : ol.events.condition.never;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.events.ConditionType}
*/ */
this.toggleCondition_ = goog.isDef(options.toggleCondition) ? this.toggleCondition_ = options.toggleCondition ?
options.toggleCondition : ol.events.condition.shiftKeyOnly; options.toggleCondition : ol.events.condition.shiftKeyOnly;
/** /**
* @private * @private
* @type {boolean} * @type {boolean}
*/ */
this.multi_ = goog.isDef(options.multi) ? options.multi : false; this.multi_ = options.multi ? options.multi : false;
/** /**
* @private * @private
* @type {ol.interaction.SelectFilterFunction} * @type {ol.interaction.SelectFilterFunction}
*/ */
this.filter_ = goog.isDef(options.filter) ? options.filter : this.filter_ = options.filter ? options.filter :
goog.functions.TRUE; goog.functions.TRUE;
var layerFilter; var layerFilter;
if (goog.isDef(options.layers)) { if (options.layers) {
if (goog.isFunction(options.layers)) { if (goog.isFunction(options.layers)) {
layerFilter = options.layers; layerFilter = options.layers;
} else { } else {
@@ -183,7 +183,7 @@ ol.interaction.Select = function(opt_options) {
features: options.features, features: options.features,
wrapX: options.wrapX wrapX: options.wrapX
}), }),
style: goog.isDef(options.style) ? options.style : style: options.style ? options.style :
ol.interaction.Select.getDefaultStyleFunction(), ol.interaction.Select.getDefaultStyleFunction(),
updateWhileAnimating: true, updateWhileAnimating: true,
updateWhileInteracting: true updateWhileInteracting: true