Add a Translate interaction

This allows features to be moved around the map. It works much like the Modify interaction, however it's significantly simpler. It uses the geometry's underlying `translate` function.
This commit is contained in:
Christopher S. Case
2015-02-17 16:12:53 -06:00
committed by Éric Lemoine
parent d204d7764a
commit 338d0570fd
3 changed files with 322 additions and 0 deletions

View File

@@ -2504,6 +2504,22 @@ olx.interaction.DrawOptions.prototype.freehandCondition;
olx.interaction.DrawOptions.prototype.wrapX;
/**
* @typedef {{features: (ol.Collection.<ol.Feature>|undefined)}}
* @api
*/
olx.interaction.TranslateOptions;
/**
* Only features contained in this collection will be able to be translated. If
* not specified, all features on the map will be able to be translated.
* @type {ol.Collection.<ol.Feature>|undefined}
* @api
*/
olx.interaction.TranslateOptions.prototype.features;
/**
* @typedef {{condition: (ol.events.ConditionType|undefined),
* duration: (number|undefined),