Private enum for draw event types
This commit is contained in:
@@ -484,7 +484,7 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {
|
|||||||
this.sketchFeature_.setGeometry(geometry);
|
this.sketchFeature_.setGeometry(geometry);
|
||||||
this.updateSketchFeatures_();
|
this.updateSketchFeatures_();
|
||||||
this.dispatchEvent(new ol.interaction.Draw.Event(
|
this.dispatchEvent(new ol.interaction.Draw.Event(
|
||||||
ol.interaction.Draw.EventType.DRAWSTART, this.sketchFeature_));
|
ol.interaction.Draw.EventType_.DRAWSTART, this.sketchFeature_));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ ol.interaction.Draw.prototype.removeLastPoint = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop drawing and add the sketch feature to the target layer.
|
* Stop drawing and add the sketch feature to the target layer.
|
||||||
* The {@link ol.interaction.Draw.EventType.DRAWEND} event is dispatched before
|
* The {@link ol.interaction.Draw.EventType_.DRAWEND} event is dispatched before
|
||||||
* inserting the feature.
|
* inserting the feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -641,7 +641,7 @@ ol.interaction.Draw.prototype.finishDrawing = function() {
|
|||||||
|
|
||||||
// First dispatch event to allow full set up of feature
|
// First dispatch event to allow full set up of feature
|
||||||
this.dispatchEvent(new ol.interaction.Draw.Event(
|
this.dispatchEvent(new ol.interaction.Draw.Event(
|
||||||
ol.interaction.Draw.EventType.DRAWEND, sketchFeature));
|
ol.interaction.Draw.EventType_.DRAWEND, sketchFeature));
|
||||||
|
|
||||||
// Then insert feature
|
// Then insert feature
|
||||||
if (this.features_) {
|
if (this.features_) {
|
||||||
@@ -692,7 +692,7 @@ ol.interaction.Draw.prototype.extend = function(feature) {
|
|||||||
this.sketchCoords_.push(last.slice());
|
this.sketchCoords_.push(last.slice());
|
||||||
this.updateSketchFeatures_();
|
this.updateSketchFeatures_();
|
||||||
this.dispatchEvent(new ol.interaction.Draw.Event(
|
this.dispatchEvent(new ol.interaction.Draw.Event(
|
||||||
ol.interaction.Draw.EventType.DRAWSTART, this.sketchFeature_));
|
ol.interaction.Draw.EventType_.DRAWSTART, this.sketchFeature_));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -848,7 +848,7 @@ ol.interaction.Draw.Mode_ = {
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {ol.events.Event}
|
||||||
* @implements {oli.DrawEvent}
|
* @implements {oli.DrawEvent}
|
||||||
* @param {ol.interaction.Draw.EventType} type Type.
|
* @param {ol.interaction.Draw.EventType_} type Type.
|
||||||
* @param {ol.Feature} feature The feature drawn.
|
* @param {ol.Feature} feature The feature drawn.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Draw.Event = function(type, feature) {
|
ol.interaction.Draw.Event = function(type, feature) {
|
||||||
@@ -868,8 +868,9 @@ ol.inherits(ol.interaction.Draw.Event, ol.events.Event);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Draw.EventType = {
|
ol.interaction.Draw.EventType_ = {
|
||||||
/**
|
/**
|
||||||
* Triggered upon feature draw start
|
* Triggered upon feature draw start
|
||||||
* @event ol.interaction.Draw.Event#drawstart
|
* @event ol.interaction.Draw.Event#drawstart
|
||||||
|
|||||||
Reference in New Issue
Block a user