Add a 'condition' option to ol.interaction.Modify

This commit is contained in:
Frederic Junod
2016-05-09 17:13:22 +02:00
parent 8c8c4c3df4
commit b49546d2af
4 changed files with 59 additions and 2 deletions

View File

@@ -2837,7 +2837,8 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
/**
* @typedef {{deleteCondition: (ol.events.ConditionType|undefined),
* @typedef {{condition: (ol.events.ConditionType|undefined),
* deleteCondition: (ol.events.ConditionType|undefined),
* pixelTolerance: (number|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined),
* features: ol.Collection.<ol.Feature>,
@@ -2847,6 +2848,17 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
olx.interaction.ModifyOptions;
/**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event will be considered to add or move a vertex
* to the sketch.
* Default is {@link ol.events.condition.primaryAction}.
* @type {ol.events.ConditionType|undefined}
* @api
*/
olx.interaction.ModifyOptions.prototype.condition;
/**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled.