Add a 'condition' option to ol.interaction.Modify
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user