Allow drag and drop interaction to be configured with a source

This commit is contained in:
Tim Schaub
2017-08-10 07:10:13 -06:00
parent 23405b80a2
commit 17b6088a79
3 changed files with 67 additions and 1 deletions
+13
View File
@@ -2710,6 +2710,7 @@ olx.interaction.DoubleClickZoomOptions.prototype.delta;
/**
* @typedef {{formatConstructors: (Array.<function(new: ol.format.Feature)>|undefined),
* source: (ol.source.Vector|undefined),
* projection: ol.ProjectionLike,
* target: (Element|undefined)}}
*/
@@ -2724,6 +2725,18 @@ olx.interaction.DragAndDropOptions;
olx.interaction.DragAndDropOptions.prototype.formatConstructors;
/**
* Optional vector source where features will be added. If a source is provided
* all existing features will be removed and new features will be added when
* they are dropped on the target. If you want to add features to a vector
* source without removing the existing features (append only), instead of
* providing the source option listen for the "addfeatures" event.
* @type {ol.source.Vector|undefined}
* @api
*/
olx.interaction.DragAndDropOptions.prototype.source;
/**
* Target projection. By default, the map's view's projection is used.
* @type {ol.ProjectionLike}