diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index 837f82c1e3..cd7740a5bb 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -17,6 +17,7 @@ A number of internal types have been renamed. This will not affect those who us * rename `ol.OverlayProperty` to `ol.Overlay.Property` * rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property` * rename `ol.format.IGCZ` to `ol.format.IGC.Z` + * rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event` * rename `ol.layer.GroupProperty` to `ol.layer.Group.Property` * rename `ol.layer.HeatmapLayerProperty` to `ol.layer.Heatmap.Property` * rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType` diff --git a/src/ol/interaction/draganddrop.js b/src/ol/interaction/draganddrop.js index b8bb22edfa..b32015b796 100644 --- a/src/ol/interaction/draganddrop.js +++ b/src/ol/interaction/draganddrop.js @@ -1,7 +1,6 @@ // FIXME should handle all geo-referenced data, not just vector data goog.provide('ol.interaction.DragAndDrop'); -goog.provide('ol.interaction.DragAndDropEvent'); goog.require('ol'); goog.require('ol.functions'); @@ -18,7 +17,7 @@ goog.require('ol.proj'); * * @constructor * @extends {ol.interaction.Interaction} - * @fires ol.interaction.DragAndDropEvent + * @fires ol.interaction.DragAndDrop.Event * @param {olx.interaction.DragAndDropOptions=} opt_options Options. * @api stable */ @@ -118,7 +117,7 @@ ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) { } } this.dispatchEvent( - new ol.interaction.DragAndDropEvent( + new ol.interaction.DragAndDrop.Event( ol.interaction.DragAndDropEventType.ADD_FEATURES, file, features, projection)); }; @@ -182,7 +181,7 @@ ol.interaction.DragAndDrop.prototype.tryReadFeatures_ = function(format, text, o ol.interaction.DragAndDropEventType = { /** * Triggered when features are added - * @event ol.interaction.DragAndDropEvent#addfeatures + * @event ol.interaction.DragAndDrop.Event#addfeatures * @api stable */ ADD_FEATURES: 'addfeatures' @@ -202,7 +201,7 @@ ol.interaction.DragAndDropEventType = { * @param {Array.=} opt_features Features. * @param {ol.proj.Projection=} opt_projection Projection. */ -ol.interaction.DragAndDropEvent = function(type, file, opt_features, opt_projection) { +ol.interaction.DragAndDrop.Event = function(type, file, opt_features, opt_projection) { ol.events.Event.call(this, type); @@ -228,4 +227,4 @@ ol.interaction.DragAndDropEvent = function(type, file, opt_features, opt_project this.projection = opt_projection; }; -ol.inherits(ol.interaction.DragAndDropEvent, ol.events.Event); +ol.inherits(ol.interaction.DragAndDrop.Event, ol.events.Event);