diff --git a/externs/olx.js b/externs/olx.js index f7096817a3..e24cc965f7 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2674,7 +2674,7 @@ olx.interaction.SelectOptions.prototype.multi; /** * Options for snap * @typedef {{ - * features: (Array.|ol.Collection.|undefined), + * features: (ol.Collection.|undefined), * pixelTolerance: (number|undefined), * source: (ol.source.Vector|undefined) * }} @@ -2685,7 +2685,7 @@ olx.interaction.SnapOptions; /** * Snap to these features. Either this option or source should be provided. - * @type {Array.|ol.Collection.|undefined} + * @type {ol.Collection.|undefined} * @api */ olx.interaction.SnapOptions.prototype.features; diff --git a/src/ol/interaction/snapinteraction.js b/src/ol/interaction/snapinteraction.js index 5e9a7e400b..3f0ac3a1b9 100644 --- a/src/ol/interaction/snapinteraction.js +++ b/src/ol/interaction/snapinteraction.js @@ -65,11 +65,7 @@ ol.interaction.Snap = function(opt_options) { * @type {?ol.Collection.} * @private */ - this.features_ = goog.isDef(options.features) ? - goog.isArray(options.features) ? - new ol.Collection(options.features) : - options.features : - null; + this.features_ = goog.isDef(options.features) ? options.features : null; /** * @type {ol.Collection.}