Add 'layers' option to Translate interaction

This commit is contained in:
Alexandre Dubé
2016-04-13 13:35:36 -04:00
parent f92a38b28c
commit e6e9b12bac
2 changed files with 49 additions and 2 deletions
+16 -1
View File
@@ -2715,7 +2715,10 @@ olx.interaction.DrawOptions.prototype.wrapX;
/**
* @typedef {{features: (ol.Collection.<ol.Feature>|undefined)}}
* @typedef {{
* features: (ol.Collection.<ol.Feature>|undefined),
* layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean)
* }}
* @api
*/
olx.interaction.TranslateOptions;
@@ -2730,6 +2733,18 @@ olx.interaction.TranslateOptions;
olx.interaction.TranslateOptions.prototype.features;
/**
* A list of layers from which features should be
* translated. Alternatively, a filter function can be provided. The
* function will be called for each layer in the map and should return
* `true` for layers that you want to be translatable. If the option is
* absent, all visible layers will be considered translatable.
* @type {undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean}
* @api
*/
olx.interaction.TranslateOptions.prototype.layers;
/**
* @typedef {{condition: (ol.events.ConditionType|undefined),
* duration: (number|undefined),