Remove setMode method from interaction in favor of add/removeInteraction
This makes the example a bit more awkward, but eventually adding and removing interactions will be the job of an editing control.
This commit is contained in:
@@ -347,20 +347,6 @@ ol.interaction.Draw.prototype.abortDrawing_ = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Set the drawing mode.
|
||||
* TODO: Decide if we want interactions to be purely event driven - if so, this
|
||||
* method would be removed, and users would remove this interaction and create a
|
||||
* new one with the desired mode instead.
|
||||
* @param {ol.interaction.DrawMode} mode Draw mode ('point', 'linestring', or
|
||||
* 'polygon').
|
||||
*/
|
||||
ol.interaction.Draw.prototype.setMode = function(mode) {
|
||||
this.abortDrawing_();
|
||||
this.mode_ = mode;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Draw mode.
|
||||
* @enum {string}
|
||||
|
||||
Reference in New Issue
Block a user