Make interaction ctor only have an option object
This commit is contained in:
@@ -39,15 +39,12 @@ ol.interaction.SegmentDataType;
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.interaction.Drag}
|
||||
* @param {ol.render.FeaturesOverlay} featuresOverlay FeaturesOverlay
|
||||
* @param {olx.interaction.ModifyOptions=} opt_options Options.
|
||||
* @param {olx.interaction.ModifyOptions} options Options.
|
||||
*/
|
||||
ol.interaction.Modify = function(featuresOverlay, opt_options) {
|
||||
ol.interaction.Modify = function(options) {
|
||||
|
||||
goog.base(this);
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
|
||||
|
||||
/**
|
||||
* Editing vertex.
|
||||
@@ -93,7 +90,7 @@ ol.interaction.Modify = function(featuresOverlay, opt_options) {
|
||||
* @type {ol.render.FeaturesOverlay}
|
||||
* @private
|
||||
*/
|
||||
this.overlay_ = featuresOverlay;
|
||||
this.overlay_ = options.featuresOverlay;
|
||||
|
||||
this.overlay_.getFeatures().listen(ol.CollectionEventType.ADD,
|
||||
this.addFeature_, false, this);
|
||||
|
||||
Reference in New Issue
Block a user