Rename ol.interaction.InteractionProperty to ol.interaction.Interaction.Property

This commit is contained in:
Frederic Junod
2016-10-13 11:49:54 +02:00
parent 189a7f1759
commit 5a3794752a
3 changed files with 13 additions and 13 deletions

View File

@@ -17,7 +17,7 @@ goog.require('ol.geom.MultiPoint');
goog.require('ol.geom.MultiPolygon');
goog.require('ol.geom.Point');
goog.require('ol.geom.Polygon');
goog.require('ol.interaction.InteractionProperty');
goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer');
goog.require('ol.layer.Vector');
goog.require('ol.source.Vector');
@@ -255,7 +255,7 @@ ol.interaction.Draw = function(options) {
options.freehandCondition : ol.events.condition.shiftKeyOnly;
ol.events.listen(this,
ol.Object.getChangeEventType(ol.interaction.InteractionProperty.ACTIVE),
ol.Object.getChangeEventType(ol.interaction.Interaction.Property.ACTIVE),
this.updateState_, this);
};

View File

@@ -1,7 +1,6 @@
// FIXME factor out key precondition (shift et. al)
goog.provide('ol.interaction.Interaction');
goog.provide('ol.interaction.InteractionProperty');
goog.require('ol');
goog.require('ol.Object');
@@ -9,14 +8,6 @@ goog.require('ol.animation');
goog.require('ol.easing');
/**
* @enum {string}
*/
ol.interaction.InteractionProperty = {
ACTIVE: 'active'
};
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -63,7 +54,7 @@ ol.inherits(ol.interaction.Interaction, ol.Object);
*/
ol.interaction.Interaction.prototype.getActive = function() {
return /** @type {boolean} */ (
this.get(ol.interaction.InteractionProperty.ACTIVE));
this.get(ol.interaction.Interaction.Property.ACTIVE));
};
@@ -84,7 +75,7 @@ ol.interaction.Interaction.prototype.getMap = function() {
* @api
*/
ol.interaction.Interaction.prototype.setActive = function(active) {
this.set(ol.interaction.InteractionProperty.ACTIVE, active);
this.set(ol.interaction.Interaction.Property.ACTIVE, active);
};
@@ -238,3 +229,11 @@ ol.interaction.Interaction.zoomWithoutConstraints = function(map, view, resoluti
view.setResolution(resolution);
}
};
/**
* @enum {string}
*/
ol.interaction.Interaction.Property = {
ACTIVE: 'active'
};